-
Suggestion
-
Resolution: Unresolved
-
None
-
0
-
Issue Summary
When trigger of A4J rule is executed twice or more within seconds, a 'race condition' is created in "automation queue" causing abnormal behaviour in the validation part of the rule for the second execution.
Steps to Reproduce
- Create a simple A4J rule and workflow where issue is transitioned to "Waiting for Customer" when agent comments and "Customer Updated" when comment is made by the customer.
- Create a new issue and transition it to 'Waiting for Customer'. From the customer portal, add 2 comments within seconds. This should transition the issue to "Customer Updated".
- For Comment 1, In the audit logs, we could see the rule was successful and issue was transitioned to "Customer Updated".
- For Comment 2, in the audit logs, we could see the rule failed with No transitions to specified status could be found for issues (with current status) error.
- If we notice the History tab for the issue, where the rule was executed, we see for Comment 1 at 12:02 PM, which is 26/02/21 12:02:08 pm in A4J audit log, the rule is 'successful'.
- However, for Comment 2 at 12:02 PM, which is 26/02/21 12:02:12 pm in A4J audit log, the rule failed with 'Some Errors'.
- This could have happened - The customer makes 2 comments and triggers the A4J rule twice within seconds.
- Iteration 1 -
- Comment 1 matched all 'if' conditions successfully
- Comment 1 transitioned the issue to 'Customer Updated'.
- Iteration 2 - At the same instant, Comment 2 is also triggered, this has reached the 'if' condition even before or while "Step 2" of Iteration 1 is underway. Due to this, the "If" condition is passed successfully. Next, when the rule moves to the 'Transition' part, it fails as the issue is not in With Customer status anymore.
- Iteration 1 -
- This could be the reason why we see the rule failing with "Some errors" in audit logs. This would happen only when the customer adds one or more comments within seconds when the execution of the rule is still underway for the first comment.
Expected Results
'If' condition should 'fail' when A4J rule is triggered in second customer comment as the first comment would have transitioned issue to 'Customer Updated'.
Actual Results
'If' condition is successful and A4J execution moves to 'Transition' part where rule fails and throws error message in audit logs.
As A4J rule execution and Jira events are asynchronous we are getting into these 'race conditions' where rule is failing under certain scenarios. It would be great if A4J rule execution and related Jira events are made synchronous.
- links to