Inflight change/cancel

Gargichatterjee
Tera Contributor

Hi,

I have a scenario, wherein the order will take multiple days to complete. I want to implement inflight cancel/change on this order. These actions will not be through the UI, rather I need them to be implemented programmatically. In addition to this, I need to do undo transactions as well. To explain this, suppose the network is reserved, workforce appointment is booked and PONR is not yet reached. The customer can cancel the order. So the network reservation as well as workforce reservation needs to be rollbacked(undone). How can I achieve this, please suggest.

 

Thanks.

1 ACCEPTED SOLUTION

Hi @Gargichatterjee ,

That is a good question. And here's how you can build it.

 

In the example below, I have two external system callouts - Reserve TN and Book Appointment.

Make use of the Order Task action to represent these.

Build a separate subflow for happy path + compensation actions as shown below.

Thus once the Order Task for 'Reserve TN' moves to In Progress, next step will be to call an extension subflow or a Flow (up to you) with the 3 different switch cases for the Revision Actions.

 

Within the Order Task, you have an option to configure the Inflight behaviour which will tell OM if the Order Task is to be re-executed or skipped based on the type of Inflight Change. If this is not configured, the Order Task will always be re-executed which will call the extension subflow and process the steps based on the Revision Operation (i.e. Happy path v/s Inflight Change v/s Inflight Cancel)

 

You can extend this logic further based on your requirements.

ShashankInamdar_0-1701091058750.png

 

Hope this helps.

 

Regards

Shashank

View solution in original post

17 REPLIES 17

@Gargichatterjee , if and when your issue raised in this thread is resolved, please mark the appropriate reply as a solution so that others in the future with a similar query will find it useful.

Yes surely I will do that.

Hi @ShashankInamdar ,

I have configured this on the flow which gets triggered for inflight cancel on Service Order (in Decision table Service Order Fulfilment Policy). So when I am cancelling the service order explicitly it is working fine. 

I want to implement the inflight cancel on the customer order itself. For this I have done the configuration of revision operation in decision table Product Order Fulfilment Policy. I am expecting that the subflow written for inflight cancel of customer order will be picked up as it has been picked up for the SO. Is it possible?

Inflight Cancel behaviour for Product & Service Order is the same from an OM perspective.

 

If it is not invoking the expected subflows, there is some mis-configuration that needs to be rectified.

Can you please verify the attachments? It would be helpful.

Gargichatterjee_0-1701186585341.pngGargichatterjee_1-1701186972990.pngGargichatterjee_2-1701187016467.png