Events act as the starting point and ending point of the process. The Business Process Modeling perspective supports two types of events:
icon represents the Start Event.
icon represents the End Event.This chapter covers the following:
In the toolbar, click Create Start Event icon and drop it to swim lanes. By default, start event is created with blank name. You can specify name for the event in the label that gets displayed under the element. Note that you must specify the name for start event. If the name is not specified, an error is displayed at the time of model deployment. For more information, please refer to the section Rules for Connecting Elements of the Working with Sequence Flows chapter.
Figure: Create Start Event
The Business Process Modeling perspective supports following types of events:
You can add End Event icon from toolbar and flyout menu of activity.
Figure: Create End Event
OR
Figure: Create End Event - Activity Flyout Menu
To delete events, hover the mouse over the event added to the swim lanes and click the Delete icon in the flyout menu.
Figure: Delete Start Event
The event flyout menu is displayed when you hover the mouse in the proximity of the event.
Figure: Start Event - Flyout Menu
Following menu options are available in the Start Event flyout menu.
| Menu Icon | Menu Option | Description |
|---|---|---|
![]() |
Delete | Deletes the event. This icon is available for Start Event and End Event flyout menu. |
![]() |
Gateway | Adds a new gateway connection from the Start event. |
![]() |
Activity | Adds a new activity connection from the Start event |
![]() |
Connect | Adds a Sequence Flow with the event as the first endpoint. You can create only one connection from a start event. If you try to establish more than one connection, a validation message is displayed. |
To view and modify properties of Start Event, perform the following steps:
Figure: Start Event - General Properties
The UUID and ID options are displayed only when you switch to Integrator profile.
This option is available only when you switch to Integrator profile. Using this option, you can specify implementing event to initiate the process.
If you select the None option from the Event Class, then the Manual Trigger option is selected, by default. It means that user intervention is required to start the process. You can also select the Please specify option from the Event Implementation drop-down to set the event as Start Event.
Note - Currently, if a Start Event is added in the model created in web-based modeler then an error is displayed during model deployment. Also, switching the implementation type between Manual Trigger and Start Event may not work.
If you select the Message option from the Event Class, then the following implementing events are displayed.
Figure: Message Event - Implementation
If you select the Timer option from the Event Class, then the following implementing event is displayed.
Figure: Timer Event - Implementation
The events of Message class and Timer class are the Camel events that allows the users to configure Camel routes from a process model using Apache Camel spring DSL. When an event is received a process instance is kicked-off and the data is mapped from the exchange message to the data. A basic solution needs to have at least:
The file event is used to configure a Camel route that can detect file creation in a specific directory. When a file is created its content is retrieved and mapped accordingly. To configure the file event, specify the following details.
Figure: File Event - Configuration
Figure: File Event - Parameters
Figure: File Event - Split
Figure: File Event - Converter
The email event overlay allows to start a process by receiving an incoming email, and passing all the information contained as input data.
Figure: E-mail Event - Configuration
Figure: E-mail Event - Parameters
The message event is used to configure route to receive JMS messages from a JMS broker. To configure the message event, you need to provide the following details.
You need to specify following bean details to the context file.
<bean id="jmsFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL">
<value>tcp://<yourhostname>:<yourportname>/value>
</property>
</bean>
Based on your JMS server, you need to download the ActiveMQ client jars. If you have RAD setup, then downloaded jars should be copied to ipp-portal/lib folder
Figure: Message Event - Configuration
Figure: Message Event - Parameters
Figure: Message Event - Split
Using the Scan event, you can start the process instance via a Scan Tool. You can use the scan event with Manual Trigger in one process definition. It allows process instance to be started manually and via Stardust Scan.
Following parameters are associated with scan event:
Figure: Scan Event - Implementation
Figure: Generic Camel Route Event - Configuration
Figure: Generic Camel Route Event - Parameters
Note that to start any Camel event, you need to specify the user credentials through Configuration Variables. When you define any event as Camel event, these variables are created by default. Open the model properties - Configuration Variables tab to view these variables. You need to specify the value of the following configuration variables in the Default Value field:
Figure: Model Property - Configuration Variable - Camel Event
Using the Timer event you can:
You can specify following configuration details for timer event:
Figure: Timer Event - Configuration
It's also possible to create timer events based on a cron expression. To do this, you have to use the Generic Camel Route Event. For example, the following route definition will start a process instance every five minutes starting at 12pm (noon) to 2pm on weekdays.
<from uri="quartz://myTimerName?cron=0+0/5+12-14+?+*+MON-FRI"/> <to uri="ipp:direct"/>
More details about the quartz endpoint could be found here.
In certain circumstances, the deployment of a process can take some time (few seconds). Thus the camel routes can be started and consume messages from endpoints. For that reason, it's possible to get exeptions such as 'Cannot find process definition' in case events happen (i.e. a new message added to a jms queue). To avoid such exception, the camel context should contain an error handler as below:
<errorHandler useOriginalMessage="true" id="camelErrorHandler" type="TransactionErrorHandler" transactionManagerRef="carnotTxManager" xmlns="http://camel.apache.org/schema/spring"> <redeliveryPolicy maximumRedeliveries="4" redeliveryDelay="10000" /> </errorHandler> <camelContext id="defaultCamelContext" errorHandlerRef="camelErrorHandler" trace="true" xmlns="http://camel.apache.org/schema/spring"> </camelContext>
To add comments for events, perform the following steps:
Figure: Start Event - Comment Icon
Figure: Start Event - Add Comment
Figure: End Event - Properties
The UUID and ID options are displayed only when you switch to Integrator profile.
This option is available only when you switch to Integrator profile. However, note that for the end event implemenation is not yet available.
To add comments for events, perform the following steps:
Figure: Start Event - Comment Icon
Figure: End Event - Comment
The Web-based modeler supports Intermediate events which follows BPMN 2.0 semantics. Intermediate Events are events that occur after a process has been started. An Intermediate Event affects the flow of the process by showing where messages and delays are expected, distributing the normal flow through exception handling. However, an Intermediate Event does not start or directly terminate a process.
Following sub-types are supported:
You can perform following operations on intermediate events:
Note
Models containing intermediate events may cause inconsistency warnings and errors when opened
in the Eclipse-based modeler which may prevent direct deployment from the Eclipse-based modeler.
In the toolbar, click Create Intermediate Event icon and drop it to swim lanes. By default, non-boundary Timer event gets created.
Figure: Create Intermediate Event
To add the boundary event, click the Create Intermediate Event icon and drop it on activity or on the boundary of an activity.
Figure: Add Boundary Event
By default, Timer boundary event gets added. You can also define Error event as boundary event.
Figure: Boundary Event
Note that Boundary events must have an exception flow.
To add the non-boundary event, click the Create Intermediate Event icon and drop it on the diagram canvas between two activities or activity and gateway.
Figure: Non-boundary Event
Note that only Timer event can be added as a non-boundary event. Non-boundary event is always between two activities, or gateway and activity. Non-Boundary Intermediate Events should have one inbound and one outbound sequence flow, otherwise a warning is issued during model deployment.
For non-boundary timer event, the activity goes into Hibernate state till the time period is defined. Once the time period criteria meet, the next activity gets activated by completing a timer for the underline activity.
Following topology rules should be followed when modeling intermediate events in the Web-based modeler:
Figure: Events - Topology
The intermediate event flyout menu is displayed when you hover the mouse in the proximity of the data.
Figure: Intermediate Event - Flyout Menu
| Menu Icon | Menu Option | Description |
|---|---|---|
![]() |
Connect | Adds a Sequence Flow or Exception Flow with the event as the first endpoint |
![]() |
New Activity | Adds a new manual activity with sequence flow or exception flow connecting the event to the new activity. |
| New Gateway | Adds a new Gateway(XOR) with sequence flow or exception flow connecting the event to the new gateway. | |
![]() |
Delete | Deletes the event. |
Following properties are supported:
The UUID and ID options are displayed only when you switch to Integrator profile.
Figure: Interrupting Boundary Event icon - Solid Circle
Figure: Non-interrupting Boundary Event icon - Broken Circle
To add comments for events, perform the following steps:
Figure: Start Event - Comment Icon
Figure: End Event - Comment
This option is available only when you switch to Integrator profile.
Note that you need to start Event Daemon when working with Timer Event. For more information about event daemon, please refer to the chapter Managing Daemons of the Stardust Portal documentation.
Figure: Timer Event - Implementation
You can specify following implementation properties:
Figure: Event Trigger - Constant
Figure: Event Trigger - Data
Figure: Warning
Figure: Warning
Note that the Automatic Binding option is not supported in the Web-based modeler. However, it is implicitly set to True.
The Consume On Match option is also not supported in the Web-based modeler. However, it is implicitly set to False.
This option is available only when you switch to Integrator profile. Note that you need to start Event Daemon when working with Error Event.
The Error Boundary Events may only be Interrupting, meaning when the event is triggered the Activity that it is bound to is aborted and the exception path follows. The following properties are displayed:
Figure: Error Event - Implementation
Figure: Event Trigger- Other
Note that the Automatic Binding option is not supported in the Web-based modeler. However, it is implicitly set to True.
If there are multiple error boundary events, the exception hierarchies should be disjunct. For example, for Activity 1 two error boundary events are added in order say java.lang.IllegalAccessException and General(java.lang.Exception).
Figure: Multiple Error Boundary Events
Then, in this case warning is displayed at the time of model deployment. Note that you can either specify super class or sub class of the exception. If you specify both then in that case an error is displayed at the time of deployment.
Figure: Multiple Error Event - Deployment Validation
To bind boundary events to an activity, they can be dropped onto another activity or the drawing canvas. The existing exception flow, e.g. a connection, is maintained in that case.
When binding an unbound event that has incoming and outgoing connections, the incoming is deleted, whereas the outgoing will be maintained. An exception is thrown when the event is bound to the activity that is attached to the event's outgoing connection. In this case both, the incoming and outgoing connections, are deleted.
Boundary Events can be unbound from activities via drag-and-drop.
Note
To execute following examples, please start Event Daemon.
In the following example, Timer event is specified for the activity named ProcessActivityInTime. If the user does not complete this activity before the specified time interval, the timer is reached and the exception flow is followed.
Figure: Timer Boundary Event - Example
Note that the timer event is Interrupting.
Figure: Interrupting Timer Event
Figure: Activity Overview
In the following example, the user waits for the specified time interval so that the normal flow is followed.
Figure: Timer Boundary Event - Example
Note that the timer event is non-interrupting.
Figure: Non-interrupting Timer Event
Figure: Activity Overview
In the following scenario, the user completes the activity to which the timer event is bound before the timer is over.
Figure: Activity Overview
In the following example, the user completes the SourceActivity and once the timer is reached, the next activity executes.
Figure: Timer Non-boundary Event - Example
Figure: Timer Non-boundary Event - Implementation
Note that the next activity named TargetActivity is initiated only when the timer is reached.
Figure: Worklist - Non-boundary Timer Event Activity
In the following example, the user completes the activity named FirstActivity. Then, the application activity MessageTransformation is executed. If the general exception is thrown then the exception flow is followed.
Figure: Error Boundary Event - Example
Figure: Error Boundary Event - Implementation
Figure: Activity Overview