Introduction

Every process needs a trigger to start the process. In Job Stream, Events are created with Out Conditions and can be used as In Conditions to trigger the next process. But there is some scope for Events through which process can be executed. 

The Events are accessible for today with In Condition <event_name>and events created before the period are not accessible by any JobStream.  

Types of Events

There are three types of Events available in the Job Stream. 

  1. Event Consumed in the same workflow.
  2. Event Consumed in a different workflow.
  3. Event Consumed in a different master

Event Consumed in the same workflow

The events exist in the session until the Job Stream is not completed. A Job Stream starts and creates a new instance of Job Stream identified by a random ID called the session ID. The events created in an instance can be consumed by In Condition in this instance.

If the <eventA> is created in InstanceA and InstanceB than the <eventA> differently for both the instances.

If the events are used as <eventA> in any In Condition of the JobStream then it searches for an <eventA> in the current instance. 

Event Consumed in a different workflow.

If the event is used in In condition <JobStream_name.event_name> then it searches for an event created today by any session of the Job Stream. e.g. If you create two Job Stream JobStreamA and JobStreamB. And you want to use the event created JobStreamA to start the execution of JobStreamB you have to address the Job Stream name in the In Condition  e.g <JobStreamA.eventA>

Event Consumed in a different master.

The global events can be accessed using the expression <global:event_name> if created today. If you want to use the events which are created before the period can be accessed using the condition e.g. global:event1[yesterday]. This condition evaluates to true if the global event was created yesterday.

Events that have a calculation of creation date.

The events created today are accessible with the <event_name> but the events which are not accessible and created before today are used with the calculation of creation date. In the In Condition of any Job Stream, the event can be accessed using the expression <event_name[date_for_creation]>. 

What is Today and How to Configure it?

The default value for today is 00:00:00 to 24:00:00 UTC and you can configure according to the requirements and the working hours. Users can select the begin-time for the period. To set the begin-time of the period, edit the scheduler.xml file from the $SCHEDULER_DATA/config folder, and add the parameter sos.jobstream_period_begin for the start time of the period. If you didn't add the value for the parameter sos.jobstream_period_begin by default it takes 00:00:00 to 24:00:00 in UTC.

The syntax for parameter: 

 <param name="sos.jobstream_period_begin" value="08:00"/>

The above parameter accepts only the UTC timezone. So, if the parameter is set with the value 08:00 UTC then the period begins from 13:30 IST and the next period is started after 24 hours. 


Note: Whenever expression <event[today]> is used in any In Condition and Out Condition it takes the period mention in the scheduler.xml.

How to access the events which are in a period

The events by default, when used the expression as <event_name>, search for the event in the period. If the event exists in the period then only it evaluates to true otherwise the conditions become false. 

The expression <event_name> searches for the event created in the currently available session of Job Stream.

The expression <event[today]> searches for the event created today in all available session of Job Stream.

How to access events which are not in a period

The events can be accessed using the In Conditions expressions if they are not in period. Some examples of the expressions are:

  1. event[today]: Search for the events created in the period.
  2. event1[yesterday]: Search for the events created yesterday.
  3. event1[month.day_of_month]:  Search for the events created on the day of the month e.g event1[4.28]: search for the event created on 28'April.
  4. event1[yesterday-3]: The expression calculates the value 3 days before yesterday.

Note: If the two events are created with the same name in the Job Stream in different sessions and In Condition is used as event1[today] then it will search for an event in the latest available session of the Job Stream.


  • No labels