Show TOC

Procedure documentationCreating Event-Driven Schedules with Events Locate this document in the navigation structure

 

Events allow the creation of complex dependencies, as they can be raised and cleared by completed jobs or manually. If you have platform agents, you can also create file events which allow files to raise events. A job waiting on events will not start until all events it is waiting for have been raised. This guaranties that a job will not start unless all conditions are met for it to start.

Event definitions define event objects. When an event definition is raised, a new event object is created and associated with the event definition.

Raising an event definition object multiple times will create a queue of event objects of which the first event will be raised and all queued event objects will be pending.

Clearing a raised event definition will clear its currently raised event object and, if there are pending event objects queued for the event definition, raise the next event object and put the event definition back into the raised state. If there are no more pending event objects to be raised, the event definition returns to the cleared state.

Events can be raised and cleared manually, by completed jobs, an SAP System repository object, and the ProcessServerService (for file events). Jobs can wait for one or more event objects to be raised before they start. The Raised by and Cleared by fields will clearly reference which object or user raised or cleared the event.

Event Definitions are part of the Definitions section in the navigation bar. There are no standard event definitions provided with SAP CPS Raiser and Clearer Comments can be made compulsory, which will force users who manually raise or clear an event to provide a reason for their actions, the user account that raised/cleared the event will be saved as well. For jobs and job chains the raiser/clearer comments can be defined in the job definition / job chain.

The following substitution parameters are available for raiser comments in job definitions and job chains:

  • ${jobid} - The job id of the raiser job

  • ${jobdescription} - the raiser job name, as displayed by the job monitor at the time of raising the event.

  • ${jobstatus} - The status of the job at the time it raised the event.

The following substitution parameters are available for raiser comments of file events:

  • ${CurrentDateTime} - Current date & time

  • ${CurrentTimeStamp} - Current time

  • ${FileDateTime} - File modification date & time

  • ${FileTimeStamp} - File modification time

  • ${ServerDateTime} - Central server date & time

  • ${ServerTimeStamp} - Central server time

  • ${server} - Server name

  • ${filename} - file name

The default raiser comment is the following:

Event raised by Job:${jobid} (${jobdescription}) going to status ${jobstatus}.

Actions

Event definitions support the following actions:

Action

Description

Raise

Raise the event definition

Clear

Clear the event definition

Clear All Pending

Clears all pending event definitions

Export

Export the event definition into a CAR file

Edit

Edit the event definition

Edit Security

Edit the security of the event definition

Delete

Delete the event definition

Duplicate

Duplicate the event definition

Expand All

Expand all event definitions in the current filter

New

Create a new event definition

Filter > New Filter

Create a new event definition filter

Filter > Edit Filter

Edit current event definition filter

Filter > Delete

Delete current event definition filter

File Events

Events can also be raised by files on servers with a platform agent.

  • Triggering Events with Files (see the documentation shipped with SAP CPS for more information on this feature)

  • Files on AS/400 Trigger Events (see the documentation shipped with SAP CPS for more information on this feature)

Finding Event Definitions

You can search for event definitions using filters and the Search Event Definitions box on the Event Definitions tab. This box is known as the intelliSearch box and located under your username on the top right-hand side of the user interface. Filters allow you to specify a list of objects with static criteria. IntelliSearch allows you to specify complex queries in a simple way using prefixes. Prefixes are used to specify which property you are searching in and have short and long syntaxes. For example, if you want to display all event definitions with the term import in the comment, you would use the search criteria as follows:

c:import

You can search more than one property, as follows:

c:import n:Bi

Note Note

No spaces should be entered before or after the colon (:).

End of the note.

See the Advanced Object Search for more information.

The following table illustrates the available prefixes for event definitions:

Prefixes

Description

n, name

searches the name property

c, com, comment

searches the comment property

d, desc, description

searches the description property

a, app, application

searches the application property

Deleting Event Definitions

You can only delete event definitions when no other objects relate to them. For example, if there are still jobs or job definitions that reference the event (both as wait or raise event), the event definition cannot be deleted until all references have been deleted. You can see all references to the event definition in Related Objects in the lower detail pane and on the show page. Furthermore, you cannot delete events which are raised, clear them before you delete them.

Note Note

Raise events are not displayed in the Related Objects table as they these events are displayed as Raised in the event definition table.

End of the note.

The table in related objects contains three columns:

  • Type - the type of object, like job raise event for for a raise event in a job, with a link to it

  • Related Object - the name of the object with a link to it

  • Used As - objects can sometimes be used as different object types

For example, event definitions that are used in job chains, will have the call-reference in Related Objects. The type will be Job Definition Raise Event, for example and the Related Object will be the name of the job chain followed by a colon and the name of the event.

Security

Privilege

Description

EventDefinition.Create

Create event objects

EventDefinition.View

Access events and event objects

EventDefinition.Raise

Raise events

EventDefinition.Clear

Clear events

EventDefinition.Clear Pending Events

Clear pending events

EventDefinition.Delete Archived Events

Delete archived events

EventDefinition.Edit

Edit event objects

EventDefinition.Delete

Delete event objects

You can grant privileges on two levels, Access and Admin; a privilege granted on Admin level allows the grantee to grant the privilege to other users. These privileges can be granted system-wide, per partition or isolation group.

If you have the security module, which requires the Module.Security license key, you have an additional Security tab on the event definition. It allows you to specify which users can access, edit and delete the event object.

Procedure

  1. Choose   Definitions → Event Definitions  .

  2. Choose Refresh to see all existing event definitions.

  3. Choose New to create an event definition.

  4. Fill in the details, refer to the section below.

  5. Choose Save and Close to save the event definition.

Event Definition

Tab Name

Field Name

Description

Event Definition

Partition

The partition of the event definition.

Event Definition

Name

The name of the event definition.

Event Definition

Application

The name of the application used to group this object.

Event Definition

Description

An optional description of the event definition.

Event Definition

Requires Raiser Comment

Does this event definition require a comment when it gets raised?

Event Definition

Raiser Comment

Comment when it gets raised

Event Definition

Requires Clearer Comment

Does this event definition require a comment when it gets cleared?

Event Definition

Clearer Comment

Comment when it gets cleared

Comment

Comment

An optional comment of the event definition.

File Event Definition

Name

The name of the event definition.

File Event Definition

Description

An optional description of the event definition.

File Event Definition

Enabled

Is this file event enabled? Disabled file events will not trigger events.

File Event Definition

Directory

Directory to await the incoming file

File Event Definition

Pattern

Pattern of the file name, can be explicit file name or contain GLOB (* and ?) wildcards

File Event Definition

Move Directory

Once the file has been picked up, move the file (use of this is recommended)

File Event Definition

Poll Interval

Interval to poll the file system.

File Event Definition

Check if file is in use

Check if the file is in use, the process server will wait until the file has been released before raising the event.

File Event Definition

Process Server

The process server which runs on the server.

Example

  1. Choose   Definitions → Event Definitions   in the Navigation bar.

  2. Choose New and fill in these values:

Event Definition Tab

Name: DataWareHouseLoaded

Description: Data Warehouse loaded

Comment: The data warehouse has been loaded. Reports that require data from the data warehouse should wait for this event to be raised.