Process Shipment Order (Stage)
Description
The Stage "Process Shipment Order" contains all tasks that are required for processing the request's data and preparing the request. Changes on these data may have consequences on the Sentries conditions of other tasks.
This Stage contains the following tasks:
- Approve dangerous goods (Process Task & Process) (Not implemented yet)
- Complete Shipment Order (Human Task) (confirm milestone)
- Create Invoice (Human Task)
- Change Shipment Order (Human Task)
- Organize Flight (Human Task)
Listeners:
The Milestone "flight departed" got a caseExecutionListener.
Implemented in Java class: org.educama.shipment.control.caseExecutionListener.FlightDepartedListener.java
The event when the Listener get´s notyfied is: "occur"
The Listener set the field status of the shipment entity to "FLIGHT_DEPARTED" if the Milestone "Flight departed" has transition to the state "occur"
The Shipment Case got a caseExecutionListener.
Implemented in Java class: org.educama.shipment.control.caseExecutionListener.ShipmentCompletedListener.java
The event when the Listener get´s notyfied is "terminated"
The Listener set the field status of the shipment entity to "SHIPMENT_COMPLETED" if AutoComplete of the Stage "Process Shipment Order" transitions the stage to the state "complete" the exitCriterion of the "Shipment Case" will transition the "Shipment Case" to the state "terminated".
Stage "Change Shipment Order"
The stage "change shipment order" is neccesary to terminate "enabled" instances of the task "Change shipment order" if the exitCriterion of the stage is true.
Sentries und Rules
Entry Criteria für Stage
- Task Transportauftrag erfassen wurde beendet
Exit Criteria für Stage
- OnPart to Shipment Case with event "complete"
Complete Conditions:
- Auto Complete
Required Rule:
- True
Manual Activation Rule:
- False
Repetition Rule:
- False
Sentry of Milestone "flight departed":
- Condition: ${flightDepartedSentry.isDeparted(execution.getId()) == true}
- Evaluation: The above method evaluates the boolean caseVariable "isDeparted" if the variable is set to "true" the sentry evaluates to true.
- Trigger: The caseVariable can be set with the REST-Call "Achieve Milestone Flight Departed" wich can be found in the Postman-Collection.