Amendment Workflow
Since an order amendment involves the modification of the current execution plan, a predefined process is adopted. The predefined process is as follows:
- After accepting an order amendment request, the Orchestrator first tries to suspend the current execution plan by sending the suspend requests (
PlanItemSuspendRequest
message) to all the plan items that are inEXECUTION
state. Based on the implementation of the process components, and the point at which the process component is executed, the process components might send a successful suspend response (PlanItemSuspendResponse
message) or a successful completion response (PlanItemExecuteResponse
). Any one of the responses is acceptable by the Orchestrator. - Once the execution plan (and order) reaches the
SUSPENDED
state, the Orchestrator sends a plan generation request to Automated Order Plan Development to generate the execution plan as per the order lines in the amendment request. - The new execution plan generated by the core Automated Order Plan Development is merged with the existing plan to add, or to modify the plan items as per the changes in the amendment request.
- Based on the modification rule characteristics defined in the product model, the compensatory plan items are added in the new execution plan to let the undoing of the tasks that were performed by the earlier corresponding plan items. If required, the
REDO
plan items are also added in the new execution plan to redo the tasks that need to be performed by a particular plan item. - After receiving the consolidated execution plan for the amendment request from Automated Order Plan Development, the Orchestrator activates the
SUSPENDED
plan and starts orchestrating it as per the latest dependencies. - All
SUSPNDED
plan items is activated, either for cancellation (cancelWithNoRollback
orcancelAndRollback
) or resume execution (resumeExecution
) by sending thePlanItemActivateRequest
messages. - Any compensatory and redo plan items, created during the amendment process, is executed in the same way as the regular plan items by sending the
PlanItemExecuteRequest
messages, so as to either complete or cancel the order.