The Subflow concept is used to ease the Event Process development when composing large Event Processes. When an Event Process B is copied into another Event Process A, all the data such as service instances and routes in B is copied and shown as a single entity (icon) in A. By default, the icon takes the name of the added Event Process - B. When we double-click on the icon it shows all the service instances/routes and so on. The ports of the inserted Event Process B can be exposed for communication with Event Process A.
The External Event Process is explained with an example. Steps to add EAI_DEMO Event Process in Simple Chat Event Process are explained below:
- Open an Event process (Simple Chat) and click the Insert Element into Event Process icon and select the Insert Event Process option from the drop-down list (or) right-click on the Orchestration Editor and select Insert Event Process.
Figure 1: "Insert Event Process" option
- The Select Event Process dialog box is displayed as shown in Figure 2. Select the Event Process from the list and click the OK button.
Figure 2: "Select Event Process" dialog box
- The Event Process instance representation appears on the Event Process editor, as shown in Figure 3.
Figure 3: Inserted Event process
Double clicking the EAI Demo icon shows all the service instances and routes inside as shown in Figure 4.
Figure 4: Component ports
To get back to the event process root or any of the parent subflows, click the Navigate to Host Flow icon from the toolbar as shown in figure 5 and select the parent subflow from the drop-down menu.
Figure 5: Navigating back to a Parent Subflow
By default, no input and output ports are shown for an inserted Event Process instance. You can expose the required input and output ports of service instances present in the Event Process instance from the Properties tab as shown in Figure 6.
Figure 6: Properties tab
Routes can be connected between other service instances in the Event process and subsequently inserted into the Event Process. This allows the connected service instances to communicate with each other.