Workflow with hierarchy

Hello,
I am trying to develop a hierarchy workflow, where it works through the subitem status in an order to assign a status to the main item?
I’ve manged to get the workflow, but it doesn’t stop if the first criteria is met.
Any suggestions on how I could do this with hierarchy?
Thanks

Kirsty