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!
Solved! Go to Solution.
I do not think you are using the State Machine correctly. Here is one way you can make it work
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.
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.
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.