Triggering workflow rule automatically again
Hello,
I have a problem with triggering YT Workflow rule. I have a issue field, that have an on-change rule(Rule #1) that sets automatically value to other("Blue"), when specific value is manually filled to this field("Red"). I have another on-change rule that is trigerred by isChanged method on this field (Rule #2). For purpose of logic behind this rule I need to trigger it within the same transaction as the Rule #1. My problem is that Rule #2 triggers from manual change of this field and work with that value, but within the same transaction Rule #1 automatically recognize its specific value and gets triggered too. Problem is the Rule #2 is no longer triggered because it was done within the same transaction and I need it to work with final value. I found that only rules which were not triggered are repeated, but thats not the case.
Rule #1 trigger = field was manually changed to value for instance "Red", process = Changes it automatically for example to "Blue"
Rule #2 trigger = field was changed
So process goes like this:
value of field changes manually to "Red" => Rule#2 is triggered and Rule#1 as well => final value is "Blue" but Rule#2 was trigerred with value "Red" ,it is no longer triggered, but I need it to work(get triggered again) with final value "Blue"
Any idea of a workaround or if its even possible?
Thanks for help.
Please sign in to leave a comment.
Hello Za Jan!
I see 2 options which you can try in order to avoid interference between 2 rules:
1. You can combine both rules in one state-machine rule. Just describe the desired transitions in the rule and in this case you will avoid cumulative effect. Please refer to the guide for more details.
2. You can set up a flag using a tag or custom field which will be invisible for the users. With the help of this flag you can divide whether the field is changed manually or because of workflow automation. Meantime you can include this flag in the guard condition of the rule in order to avoid false triggering of the rule. Don't forget to change flag back in the end of the transaction.
Feel free to return to me in case of any questions.
Hello Leonid Zalog!
Thank you so much for advices.
Unfortunately I wasnt able to acomplished my goal with any of your recommended steps. I simply "hack it" by defining another rule that has logic of Rule #2 and gets triggered by "Blue" value. I forgot to mentioned that the final value of Rule #1 is always the same, so I can easily check it. It is maybe not exactly efficient but its doing its job. Due to various number of other condition that triggers Rule #2 I had to make it in another rule that simply checks for only this condition(check if it is value "Blue")
So proces goes like this now:
value of field changes manually to "Red" => Rule#2 is triggered and Rule#1 as well => final value is "Blue" and that triggers Rule #3(which has the same logic as Rule #2)
This is in my case efficient enough. But thanks again for your ideas.
Best wishes,
Za Jan.