Service Launch Order
Service Launch Order (SLO), present in Properties, enables Event Processes to launch the microservices and/or stop them in a predefined order by using the below options available under SLO tab:
- Specify Launch orderSets the sequential order of launching microservices involved in an Event Process. Components will be launched as per the priority set and will not proceed further if any of the prior components to be launched fails to start.
- Specify Stop orderSets the sequential order of stopping the microservices which are under execution. Service Launch Order is useful where a set of components are required to function in a predefined order.
Specifying Launch/Stop Order
After designing the event process with relevant components, to set Launch order and/or Stop order in Service Launch Order tab, follow the steps below:
- If Properties section is not visible on the screen, do any one of the below:a. On the Window menu, navigate to Show View > Other > General, select Properties, and then click OK.b.Right-click on the Orchestration Editor and click Properties.
- Under Properties section, click the Service Launch Oder tab on the left side.
- By default, the launch order and stop order will be disabled with their respective drop-drown options: Specify Launch order and Specify Stop order, set as "no". Enable the functionality by changing the option to "yes".
- By default, the Launch order and Stop order value for all the Microservice Instances in the event process will be "-1". Enter values above zero as per the required order of priority upon which the execution needs to happen.
On execution of event process, the sequence of launching and stopping the microservices will be as per the values set for the Launch order and Stop order corresponding to their Service Instances.
Launch Order Example
In the above example, Specify Launch order is enabled (selected "yes" from drop-down), names of microservices can be seen under Service Instance, and Launch order is filled with appropriate values for the corresponding Service Instances.
As per the values assigned, Component_3, Component_4, and Component_5 are in the SLO, whereas Values for Component_1 and Component_2 are set less than or equal to zero (<=0) as these components are out of scope from the SLO and hence of no relevance in terms of the launch order.
Component_4 will start first because this is the least positive value (>0) among all others. Component_3 will be the next component to start as it holds the next highest value than Component_4. The last microservice to launch will be Component_5 as it holds the highest value among all.
Stop order
Stop order follows the same logic as that of Launch order. So, set the values in similar way (as illustrated in the above example), after enabling Specify Stop order (selecting "yes" from drop-down), to stop the execution of each component in the required order.