- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2024 11:54 AM
Hi,
I created a scheduled job to auto close the resolved RITMs. PFB the script. But when this script was executed it triggered the workflow again for most of the resolved RITMs and because of that all the related task are created again. Please let me know what i did wrong.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2024 12:39 PM
Hi @Sarabjeet1 ,
Try gr.setWorkflow(false) before gr.update() line.
This will stop any workflow or BR to execute when u r executing ur script.
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2024 12:22 AM - edited 04-21-2024 12:23 AM
Hi @Sarabjeet1,
Since the 'state' field is an integer type, you should change the script from gr.state = '50'; to gr.state = 50;
In regards to the second point, I was referring to the 'close_state' attribute, something like the below:
If the 'close_states' attribute has been configured properly, there is no need to have the following line of code - gr.active = false;
In regards to #3, are you referring to the Workflow version? What I meant was, if the workflow is re-triggered for some RITMs only, compare the field values of RITMs (such as active field, state field, etc) to the other RITMs where the workflow was not re-triggered. By doing so, you can identify why those workflows were re-triggered and identify the root cause.
Hope that makes sense.