Configuring internal events

You can configure internal event conditions to create a trigger that monitors the different phases of a job or job stream or workstation to initiate the submission of a job stream. If required, you can create multiple triggers to extend the scenario.

About this task

If you add multiple event conditions in a trigger, and when the first event condition is satisfied, the selected job stream is submitted and moved to ADD status. The job stream is then moved to RUN status and starts the job, only when all the event conditions in the trigger are satisfied. You can also configure the definition to include multiple triggers and the selected job stream is submitted only when all the event conditions in any one of the trigger is satisfied.

Procedure

  1. Open Orchestration CLI and then, enter the command as follows:
    ocli model new
    An empty template is displayed.
  2. Enter the following definition and configure the attributes as per requirement to add triggers and event conditions to the job stream.
    $jobstream
    JOBSTREAM [workstation folder][workstation name]#[job stream folder][job stream name]
    TRIGGER [trigger name] DESCRIPTION "Add any description" 
        CONDITIONS [IN ORDER]
            NAME [Event condition 1] TYPE "InternalEvents/[specify event type]"
            FILTERS 
            [filter 1 = value], [filter 2 = value], [filter 3 = value]
            NAME [Event condition 2] TYPE "InternalEvents/[specify event type]" 
            FILTERS 
            [filter 1 = value], [filter 2 = value], [filter 3 = value]
    ENDTRIGGER
    TRIGGER [trigger name] DESCRIPTION "Add any description" 
        CONDITIONS [IN ORDER]
            NAME [Event condition 1] TYPE "InternalEvents/[specify event type]"
            FILTERS 
            [filter 1 = value], [filter 2 = value], [filter 3 = value]
            NAME [Event condition 2] TYPE "InternalEvents/[specify event type]" 
            FILTERS 
            [filter 1 = value], [filter 2 = value], [filter 3 = value]
    ENDTRIGGER
    :
    Specify the job to be triggered 1 [workstation folder][workstation name]#[job folder][job name]
    Specify the job to be triggered 2 [workstation folder][workstation name]#[job folder][job name]
    END
    
    Note: Filters and corresponding values depends on the internal event type. For mandatory and optional filters associated with each internal event type, see FILTERS.

    Add value for each attribute as follows:

    JOBSTREAM
    Specify the job stream name in [workstation folder][workstation name]#[job stream folder][job stream name] format. All the event conditions you set are saved to this job stream.
    TRIGGER trigger name
    Specify a name for the trigger. No wildcards are accepted. You can create single or multiple triggers in a job stream as per requirement. Each trigger must contain an event condition. If required you can add multiple event conditions also.
    DESCRIPTION
    Enter a description in free text.
    CONDITIONS
    You can add single or multiple event conditions in a trigger. If you add multiple event conditions, the selected job stream is run only when all the event conditions are satisfied. When you add multiple event conditions and wants to trigger the job only if it happens sequentially, add the attribute IN ORDER. In such cases the jobs are only triggered when the multiple event conditions are satisfied sequentially. Each event condition must contain the following information.
    NAME
    Specify a name for the event. Wildcard characters are not accepted.
    TYPE
    Specify the internal event plug-in with event type separated by a forward slash (/).
    “InternalEvents/Internal event type
    The different types of internal events are:
    • JobStatusChangeEvent
    • JobLateEvent
    • JobStreamStatusChangeEvent
    • JobStreamLateEvent
    • JobStreamCompletedEvent
    • WorkstationStatusChangeEvent

    For more information on internal event types, see Internal events.

    FILTERS
    The attribute filters vary based on the internal event types. For the mandatory and optional attributes associated with each event types, see the following topics:
    Job to be triggered
    Specify the job that must be submitted when the event conditions set are satisfied. You must specify the job and associated workstation in the following format: [workstation folder][workstation name]#[job folder][job name]
    For example,
    $jobstream 
    JOBSTREAM /WS_AGT_0#/JS_LATE
      MATCHING SAMEDAY
    :
      /WS_AGT_0#/JOB1
      /WS_AGT_0#/JOB2
      /WS_AGT_1#/JOB3
      /WS_AGT_2#/JOB4
    END
  3. Save the template and close.

Results

You have successfully created a job stream with internal event conditions.