That is strange. Perhaps we could check this over a call.

A further question, are you sure the workflows that you see in the "waiting" state are not the relaunched ones? Do you see another instance of the workflow that was 'cancelled' from under executions?

Hi @ShashankInamdar, I’ve tried this cancel scenario on couple of orders and can see that the workflow triggered at the time of provide journey gets canceled when I cancel the service order, and the same workflow gets relaunched.. this workflow then moved into waiting state. Is it the correct functionality?

As part of cancel, I need the following actions:

-cancel the provide workflow as soon as the cancel request is received: This is available OOTB

-Trigger cancel workflow: This can be achieved through decision table

-identify the workflows executed for the provide orders and check all the steps executed

-Perform reverse of all steps executed before receipt of cancel request

can you please guide me to the documentation that could help me with this. Thank you..!!

Hi @ashwajit_b 



 when I cancel the service order, and the same workflow gets relaunched.. this workflow then moved into waiting state. Is it the correct functionality?

Yes, this is the correct functionality.

 


-identify the workflows executed for the provide orders and check all the steps executed

-Perform reverse of all steps executed before receipt of cancel request

can you please guide me to the documentation that could help me with this. Thank you..!!


As mentioned on the other thread, there is a Flow context field on the Domain Order which stores the Subflow execution sys id. The challenge you will face with this is that as soon as the inflight is submitted this field will be updated with the relaunched subflow sys id.

As such if you are able to store the flow context value on another field at the beginning of the subflow execution you should be able to retrieve this during Inflight.

I am curious though, even if this was done - how do you plan to determine what steps were executed in the normal flow until an Inflight was received.

Hi @ShashankInamdar ,

What is the purpose of relaunching the workflow, If we are canceling the service order?

As part of general cancel orders, the executed actions, before receipt of the cancel request, would generally be reversed, but ServiceNow does not seem to have this as OOTB functionality, hence I'm looking out for some guidance regarding the same.

 

Thank You