Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

rules - How to sequence, how to terminate

Rick.Piovesan March 22, 2021

I have a set of automation rules:
1) that need to run in a priority sequence. That is, a given ticket could match on a number of rules so the most important one should go first. How to do this?
2) once a rule has been matched, how to abort further rules from processing?
RickP.

1 answer

1 accepted

1 vote
Answer accepted
Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2021

Hey @Rick.Piovesan  and welcome to the community,

Unfortunately there is sequence possible in the execution of Automation rules.

When the rules all match they will all fire at the same time (or in a random order which you cannot control).

The only way to create what you want would be to create a single rule and within the rule define the multiple scenario's. I dont know your use case of course but it will be the only way to give some kind of control to what is executed and when.

Within a single rule, it will run top-down and you can build this up with conditions.

Rick.Piovesan March 22, 2021

Wow this is unexpectedly crude - a rules engine with no way of threading, prioritizing or aborting  (and this is the 'new' rules engine !?!)

I will go with your idea of "One rule to Contain them all" (where have I heard that before..). But its going to be a huge, messy, complex and probably indecypherable mess once I finally get it working.

Big, big, big disappointment in Atlassian ..

Rick.

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2021

Well you'll have to write out your rule/rules and see if there maybe it a way they can trigger each other if needed.

That could also be a way of linking them together and sequencing them.

I understand that it would be great to have multiple rules with the same trigger and have them run as dependencies of each other.. but nope..

Having multiple massive If's tho will be your best bet for now..  We'll see if they improve it in the future!

Rick.Piovesan March 22, 2021

to your first para - how could a rule trigger another rule? If 'A' needs to somehow trigger 'B' but no way to make sure that 'B' doesn't run before 'A' ?

i don't care/want dependencies, just enough to be sure that 'A' runs before 'B' (prioritizing) would be sufficient for now - something that is really basic to any rules processing.

With this alone we can work around all other painful limitations - i.e., "stop processing any more" could be a flag that is checked in each subsequent rule ..

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2021

Well just from the top of my head you could

  • add a custom field (text would be fine)
  • As the ‘last’ step in your first rule set this field to some value
  • make your subsequent rule trigger on that customfield change and add an if to check the value. 

basically you create your own order custom field. 

Like Rudi Strydom likes this
Rick.Piovesan March 22, 2021

Ok - are you saying that rules can be made to run in a specific sequence order?

If so, how is that order set?  (can't be the UI's displayed order because the display grid is sortable).

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2021

Well yes and no,

out of the box there is no mechanism to do this. But you can use the blocks that are available to create this yourself.

If you first create rule 1 which triggers on the normal trigger that you want, in the execution of that rule you add a step (preferably at the end) that sets a custom field to a specific value.

Your 2nd rule then would have a trigger of "issue updated" which check on the value on that field. If it matches you execute rule 2.

For rule 3 you can do the same, you can use the same custom field but with a different value. (which you would have set then in your 2nd rule)

Is it ideal and elegant, not really. Will it work, most likely yes.

You would create your sequence by working with specific triggers (issue updated) with a custom field and a value. Could be as easy as setting the field to 1, 2 or 3..

Rick.Piovesan March 22, 2021

Got it .. yep a kinda 'Rube Goldberg' approach to enterprise software architecture but should work - I'll try it out now. Thx, Rick.

Like Dave Furlani likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events