Skip to main content

Hello

I am making a workflow for the approval of new customers. Based on the credit rating that is filled in on the document 1 or more managers need to approve. So I when manager 1 has approved I want the WF to check the rating of the customer, if it is bad 1 or more managers higher up must approve as well.

 

In attachment you have an example. The conditions in my first "Run if" were met so the state should go to "Approval Business controller". But as there are different "Change State" actions the WF will always execute the last one.

Is there any way around this?

Thanks in advance for your assitance!

Thomas

Thomas,

I do not think you are using the State Machine correctly. Here is one way you can make it work 

191344_pastedImage_1.png

You could also use "Switch" action in place of a state machine.


The Change State action only executes at the end of the State Branch, so as you have the End State Machine at the end running after your first Change State action, it will always override it.

If you were to put your End State Machine action in another Run If that would mean it wouldn't run unless that Run If condition was met.

There are possibly better ways of managing this process, but without seeing the entire process I wouldn't want to specualte on it.


Hello,

Always protect your Change State actions with conditionals (run if, condition yes / no) so that they are only executed accordingly and you will never have to worry.  This is a sure-fire way to making sure they execute the way you are expecting.

Thanks,

Mike


In the last one, add Run If around End State and the condition should not equal any of the other conditions listed.


Hello

Thank you all for you quick replies! I am a beginner so I am just looking for simple ways to get to what we need without having to bother our IT department.

My problem was that I need to change states based on combinations of conditions. So "set a condition" wouldn't really work. So as you said if I adjust the last "run if" action it seems to work fine.

 

The switch action looks interesting but I don't know where I should put my conditions.

I also thought about putting all possible combinations of conditions in a variable (state A, state B,..) and then use these to determine the branch, but that seemed to complicated.


The switch would replace the state machine.


Has your original question been answered?   If so can you mark a correct answer.  Also  if you have more questions, we have more answers happy.png


Yes, this answered my question. Thank you!


Reply