Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.7.1
-
None
-
None
Description
Current Situation
When the JS7 Agent is stopped and restarted later on or when a order is suspended & resumed after some delay, then a workflow using a Cycle Instruction holding a ticking cycle will executes twice.
Steps to reproduce
- Import the attached workflow JSON file or create one consisting of a Cycle Instruction of ticking type which is configured to execute the workflow every minute.
- Stop the JS7 Agent and wait for some time.(e.g. 10 min.)
- Start the JS7 Agent. We observe that the Agent will execute the workflow twice without waiting for the interval of 1 min. Which is evident from the below enteries in the order's log.
2024-11-05 13:42:22.752+05:30 [MAIN] [OrderProcessingStarted] id=#2024-11-05#T79312981605-root, Job=job, label=job, pos=0/cycle+end=1730831400000,period=1,i=7,next=1730793480000:0, Agent(url=http://localhost:2073, name=primaryAgent, time=2024-11-05 13:42:21.754+05:30) 2024-11-05 13:42:31.399+05:30 [SUCCESS] [OrderProcessed] id=#2024-11-05#T79312981605-root, Job=job, label=job, pos=0/cycle+end=1730831400000,period=1,i=7,next=1730793480000:0, Agent(time=2024-11-05 13:42:31.386+05:30), returnCode=0 2024-11-05 13:42:31.479+05:30 [MAIN] [OrderProcessingStarted] id=#2024-11-05#T79312981605-root, Job=job, label=job, pos=0/cycle+end=1730831400000,period=1,i=8,next=1730794320000:0, Agent(url=http://localhost:2073, name=primaryAgent, time=2024-11-05 13:42:31.445+05:30) 2024-11-05 13:42:40.652+05:30 [SUCCESS] [OrderProcessed] id=#2024-11-05#T79312981605-root, Job=job, label=job, pos=0/cycle+end=1730831400000,period=1,i=8,next=1730794320000:0, Agent(time=2024-11-05 13:42:40.636+05:30), returnCode=0
Desired Behaviour:
The Cycle Instruction should not execute the workflow twice upon restart of Agent or when a order is suspended and resumed of a workflow configured to ticking cycle type.