- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 09:58 AM
Hi Team,
We have a workflow on RITM table.
after a catalog task creation using catalog task activity, I am setting scratchpad object with this task sysID.
in next step I am using wait for condition , using scratchpad value, quering sc_task table and I am checking for state change to cancelled backend value is -10.
workflow has reached this wait for condition but even after updating the state of task to cancelled still workflow is stuck at wait for condition activity only.
If I check for any other state like closed (backend value is 3). its working fine.
Any suggestions team?
bit urgent.
Best Regards,
Pooja
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 11:37 AM
The workflow is running on the RITM record, so the Wait for scripts only re-runs every time there is an update to the RITM record. Closing a Catalog task usually causes a RITM record update. If it does not in this case, you can try to add a Business Rule to the sc_task table that forces a RITM update when a Catalog Task state changes to Cancelled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 10:29 AM
Hi @Brad Bowman ,
Inside if log it self is not displaying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 10:31 AM
And what is the 'status' shown in the logs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 10:35 AM - edited 03-28-2025 10:44 AM
It is at this stage and logs are as below state 2 is nothing but work in progress
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 10:53 AM
Enhancing the logs should help see what is going wrong:
var taskGr = new GlideRecord('sc_task');
if (taskGr.get(workflow.scratchpad.sys_id)) {
var status = taskGr.getValue("state");
gs.info("pooja Catalog Task " + taskGR.number + " has the State " + status + " " + taskGR.getDisplayValue('state'));
if (status == -10) {
gs.info("pooja state inside if " + taskGR.number);
answer = true;
} else {
gs.info("pooja state else " + taskGR.number);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2025 11:14 AM
no luck,,