Now step 1 and step 2 works for me, but in step 3 I am not sure how to associate workflow 2 to workflow 1 so it automatically monitors all the incidents created corresponding to each investigation in workflow 1.
From what I understand I have to manually copy the system id of each investigation to workflow 2 to fetch status update of corresponding incident. Please confirm.
In the comment of the investigation created in Servicenow it is writing the investigation RRN into comments.
Workflow two is monitoring for ServiceNow incidents being changed, and it is pulling incident comments checking to see if any of them have a RRN, if it does, it updates accordingly.
This is a template, it would be more powerful, and work a lot better if you created a new custom field in ServiceNow for your IDR incidents, that has a field for IDR investigation identifier. Write that RRN into that section, and only monitor IDR Incidents for changes, not all incidents.
The current workflow does not monitor for specific incident ID’s, it uses a specific table called ``incident_state to watch.
Thank you Darrick, I will try to create a new custom field but for now without this custom field I was able to see the RRN number on the incident in ServiceNow. For Workflow 2 which we are running in default settings, as far as I understand it should run every 1 minute automatically and check for any incident state change, if there is a change in incident state then it will look for RRN number, if RRN number is found it will update the corresponding investigation. If this is the case please confirm if I should see under Jobs that this Workflow is running every minute. Because at this point I dont see workflow 2 triggering at all.
Also if the logic is Workflow 2 will run only when there is change in Incident - I don’t see that as well. I created an Investigation and Workflow 1 created an Incident with RRN number. Then I closed the Incident in ServiceNow but still under Jobs the Workflow 2 did not show up as running and we have to manually close the investigation.