Catalog Tasks getting cancelled automcatically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2016 09:04 AM
In my workflow, i have a catalog task which is connected to another catalog task. and i have wait for condition also.
On closure of Task 4, task 6 should be created but in my scenario, task 6 is created and getting cancelled while the RITM is getting moved to completed state. Could someone help me on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2016 02:05 PM
Hi Vaibhav,
Let me put it in a simpler way..
There are two flows-
One is going to the timer and wait for condition(It will wait for tasks associated with RITM to get closed)
Another one creates Task 4 and on closure of Task 4, Task 6 is getting created. There is time delay of 8 sec in Dev environment to create the task 6, so if i keep the timer as 8 sec, then the wait for condition works perfectly fine and RITM getting closed only on closure of Task 6
But we cannot rely on the system task creation time and set the timer accordingly.. Right. The task time creation would differ from env to env and also in case of server slowness it would take more time as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2016 06:29 AM
Alright now the scenario is pretty clear.
One way of handling this issue can be using two scratchpad variables.
For eg:
Step 1. Create variables 'flow1' and 'flow2' at the beginning of the workflow (inside the Run Script activity) and setting the value to 'incomplete'.
workflow.scratchpad.flow1 = 'incomplete';
workflow.scratchpad.flow2 ='incomplete';
Step 2. Once the flow is completed you can set the values of these variables to 'complete' (just before the timer activity).
Step 3. In the timer activity, check if the values for both scratchpad variables is changed to 'complete'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2016 07:47 AM
Your response sounds logical to me.. Impressed.. Let me try it out and get back to you.. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2016 10:22 AM
Vaibhav_Shinde, your solution works fine. now i have other issue..
I have added a Run script activity from one flow and changed its value in my catalog script(since i dont have scripting option in Timer) and then validated its value in wait for condition script. Things work perfect
But once the complete flow is done, when i look at the workflow activity i could see timer action is cancelled. This is because i believe , the other flow goes directly to the timer.. Any help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2016 11:19 AM
Can you show me the Timer Activity, share a screenshot.
Are you using catalog script to update scratchpad?
Why are you not using Wait for condition, instead of Timer?