- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 03:47 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 05:31 AM
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.
Hope this helps.
Regards
Shashank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 05:56 AM
That's great, @ShashankInamdar. Wonderful explanation.
Now two questions from me. 🙂
- "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" - Is it related to Inflight Change Type & Inflight Change Option. If not, then?
- Regarding cancel, shouldn't we cancel, instead of close complete, the order task after calling REST - Release TN step?
Thanks,
Molay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2023 06:09 AM
@MolayD21 wrote:
That's great, @ShashankInamdar. Wonderful explanation.
Now two questions from me. 🙂
- "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" - Is it related to Inflight Change Type & Inflight Change Option. If not, then? <Correct>
- Regarding cancel, shouldn't we cancel, instead of close complete, the order task after calling REST - Release TN step? <Perhaps. Depends on how you want to look at this. A close complete indicates the execution logic of the Order Task is done. A Canceled indicates the Task itself was cancelled. So, this is open to interpretation and OM will not prescribe to one way or the other>
Thanks,
Molay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2023 12:16 AM
Hi @ShashankInamdar ,
I can cancel the service order and the logic is getting executed for the same through the configured subflow. But when I am cancelling the product order itself, then the corresponding subflow is not getting executed. What can be the reason for that? When we are cancelling the order itself then all the service orders should also be revised hence there corresponding logics should also be executed. At least that is the behavious we want to achieve.
Please suggest.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2023 02:26 AM
One more thing I noticed that, in case of inflight cancel, the service orders, which were there during order decomposition their states are getting changed to scheduled. But, if few of them are already executed and completed, there is no re-execution of those tasks for the undo transactions.
For example, the following I am getting as part of inflight cancel. But what we expect is that, there should be an order task generated which will undo SO0001 as well. Please suggest what is to be done here.
Thanks.
Current State | After inflight cancel | ||
Product Order | ORD0001 | In progress | Cancellation in progress |
Order Line Item | ORDL00001 | ||
Product Order | PO0001 | ||
Service Order | SO0001 | Close complete | Close complete |
Inflight cancel ---> | SO0002 | In progress | Scheduled |
SO0003 | draft | Scheduled | |
SO0004 | draft | Scheduled |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2023 04:47 AM - edited ‎11-28-2023 04:48 AM
I suspect you have not configured the 'Cancel Task Fields' on the Order Task. Please check below for an example. If no Cancel Task Field is configured, on the cancellation, for an already completed Order Task it remains in a completed state. The additional configuration will allow you to put the task back in an 'In Progress' state.
Once the Order Task is back in 'In Progress', the extension subflow can be invoked as shown below ->
Extension subflow -->