Master Workflow - Xyna-Factory/xyna GitHub Wiki
The Master Workflow describes the phases a Xyna Order goes through when it is executed on the Xyna Factory.
A Xyna Order can be created by different means. It can be created explicitly by an user over the RMI interface or the CLI of the Xyna Factory. Orders can also be created by Filters that dynamically handle events generated by Triggers. An example would be DHCP Requests that are received by a datagram socket.
Also Subworkflows are executed as separate Orders created by their parent Workflow.
In each of these cases a Xyna Order object is created and then given to the Processing Department, that executes further Master Workflow steps.
In the Planning stage a received Xyna Order is validated and the properties of its Order Type are evaluated. Then the Planning Destination is executed. The resulting Scheduler Information object is stored in the Order and the next Master Workflow step is called. This object contains information about Capacities and Vetoes, that have to be allocated in the next step.
The Scheduler is responsible for the timely execution of Orders with the following constraints:
- Orders must be able to allocate their Capacities and Vetoes
- Priority: Orders with higher Priority are executed first
- First in, first out (FIFO): Orders that have been waiting longer are executed first
- Scheduling timeout: If an Order specifies a timeout and can not be scheduled it will eventually be aborted.
The Execution Destination corresponding to the Order Type of the Order is executed.
The Cleanup Destination corresponding to the Order Type of the Order is executed. The Capacities and Vetoes allocated by the Order are freed.
Depending on Monitoring Level the Order is archived and then the client that started the Order is notified with the output of the Execution phase.