workflow execution is not working during update
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2024 10:36 AM
Hi Team,
I have created a workflow where condition is if state change to "awaiting vendor " added a timer activity to wait for 24 once 24 hour pass send a notification and change the status of incident to "active" ,flow is working fine and set the status of incident to active ,However if again i am changing status from active to "awaiting vendor " workflow not working after 24 hour also state is not changing t active .
any suggestion why it is not working second time

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2024 11:10 AM
@vinitaraico Usually workflow triggers only for one time when the condition associated with it is evaluated to true. If you wish to re-trigger the workflow then you can do it by creating an onAfter Update business rule on your table and adding the condition State Changes To "Awaiting Vendor". You can put the following script inside the script field.
new Workflow().restartWorkflow(current, false);
Please refer to https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/server_legacy/c_Workflow_api#r_... to know more about restartWorkflow method.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 07:37 AM
Thanks Sandeep ,I tried But it is not working