Creating Event-Driven Schedules with Events
Events allow the creation of complex dependencies, as they can be raised and cleared by completed processes or manually. If you have platform agents, you can also create file events which allow files to raise events. A process waiting on events will not start until all events it is waiting for have been raised. This guarantees that a process 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 processes, an SAP System repository object, and the ProcessServerService (for file events). Processes 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 Redwood Server. Raiser and Clearer Comments can be made compulsory, forcing users who manually raise or clear an event to provide a reason for their actions. For processes and chain definitions, the raiser/clearer comments can be defined on the process / chain definition. The event has Raiser and Clearer Object fields that hold the object or user that raised or cleared the event.
User Interface
Tabs & Fields
The following table illustrates the fields of each tab of Event Definition editor dialogs.
Tab | Field | Description |
---|---|---|
Event Definition | Partition | Partitions allow you to group objects security-wise. |
Event Definition | Name | Names must start with a letter and contain only letters of the ASCII alphabet (no umlaut, for example), underscores (_), and digits. |
Event Definition | Application | Applications allow you to group objects functionally. |
Event Definition | Description | Descriptions accept free text, any printable UTF-8 character combination; ensure the client systems have both browsers and fonts required to display the characters. |
Event Definition | Requires Comment On Raise By User | Users who raise events from this definition must fill out a raiser comment, if this is set. |
Event Definition | Default Raise Comment | The predefined text for the raiser comment can contain any combination of printable UTF-8 characters, limited to 255 characters. Accepts Apache Ant-style substitution parameters, see Raiser Comments below. |
Event Definition | Requires Comment On Clear By User | Users who clear events from this definition must fill out a clearer comment, if this is set. |
Event Definition | Default Clear Comment | The predefined text for the clearer comment can contain any combination of printable UTF-8 characters, limited to 255 characters. Accepts Apache Ant-style substitution parameters, see Clearer Comments. |
Documentation | Documentation | Documentation fields accept free text, any printable UTF-8 character combination. You use the Documentation field to document the object for co-workers and as a future reference; this field is also used on some objects to place specific markers that alter the behavior of the object. |
File Event Definitions | Name | Names must start with a letter and contain only letters of the ASCII alphabet (no umlaut, for example), underscores (_), and numbers. |
File Event Definitions | Description | Descriptions accept free text, any printable UTF-8 character combination and is limited to 1000 characters; ensure the client systems have both browsers and fonts required to display the characters. |
File Event Definitions | Comment | Comment fields accept free text, any printable UTF-8 character combination and is limited to 255 characters. You use the Comment field to document the object for co-workers and as a future reference. |
File Event Definitions | Enabled | Is the file event enabled or not?. |
File Event Definitions | Raise on file(s) > Process Server | The process server running on the remote system where the file is reachable. |
File Event Definitions | Raise on file(s) > Directory | Directory containing the file. |
File Event Definitions | Raise on file(s) > Pattern | Filename or filename-pattern (GLOB) of the file to look for. Accepts GLOB wildcards: ? - Match one unknown character; on Windows, zero or one unknown character except dot (.), which is not matched * - Match zero or more unknown characters. |
File Event Definitions | Move Directory | Directory to which the file is moved once the event was raised. |
File Event Definitions | Overwrite File | If a file of the same name exists in the Move Directory should it be overwritten?. |
File Event Definitions | Poll Interval | The number of seconds between each check. |
File Event Definition | Minimal Size | The minimal file size in bytes; the event will not be raised until the minimal size has been reached. |
File Event Definition | Minimal Age | The minimal age in seconds since last modification; the event will not be raised until the minimal age has been reached. |
File Event Definitions | Check if file is in use | An additional check is performed to ensure there are no open file handles to the file. |
File Event Definitions | Raise Comment | A raise comment that is used when a file raises the event and can contain any combination of printable UTF-8 characters, limited to 255 characters. Accepts Apache Ant-style substitution parameters, see Raiser Comments below. |
Security | * | This is where you can specify who can access/change/remove the event definition. |
Context-Menu
Event definitions support the following context-menu actions:
Action | Description |
---|---|
Raise | Raise the event definition. |
Clear | Clear the event definition. |
Clear All Pending | Clears all pending event definitions. |
Export > Export | Export the event definition into a CAR file. |
Export > Export with related objects | Export the event definition into a CAR file including referenced objects. |
Promote > Promote to system | Promote the object to a remote system. |
Promote > Edit further then promote | Edit the export rule set prior to promoting. |
Promote | Promote the event definition to another Redwood Server instance. |
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. |
Show permalinks | Show links that can be used from third party applications to link to the object. |
Add to navigation bar | Add the current object to the navigation bar. |
New event definition | 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. |
Filter > Duplicate Filter | Create a copy of the filter. |
Filter > Export Filter | Export the filter into a CAR file. |
Filter > Add to navigation bar | Add the filter to a navigation bar. |
Filter > Create filter from search | Create a filter from the current IntelliSearch query. |
Substitution Parameters
Substitution parameters are place holders that are replaced when an event is raised or cleared.
Raiser Comments
The following substitution parameters are available for raiser comments in processes and chain definitions:
${jobid}
- The ID of the raiser process.${jobdescription}
- the raiser process name, as displayed by the chain definitions monitor at the time of raising the event.${jobstatus}
- The status of the process at the time it raised the event.
The default raiser comment is the following:
Event raised by process:${jobid} (${jobdescription}) going to status ${jobstatus}.
File Event Raiser Comments
Events can also be raised by files on servers with a platform agent or on AS/400 systems.
The following substitution parameters are available for raiser comments of file events:
All DateTime
variables use the format yyyyMMddHHmmss
; you can specify a JavaDateFormat using the ${FileDateTime:HHmmss}
syntax.
${CurrentDateTime}
- agent date & time when the file was detected.${CurrentTimeStamp}
- agent timestamp at which the file was detected, in a numeric format containing the milliseconds since 1970, usually referred to as epoch or UNIX time.${FileDateTime}
- File modification date & time.${FileTimeStamp}
- File modification time in epoch.${ServerDateTime}
- Central server date & time when the event was raised.${ServerTimeStamp}
- Central server time in epoch when the event was raised.${processServer
- name of the process server.${server}
- Platform agent name.${filename}
- path of the detected file (before any move).${finalPath}
- new path of the detected file (after any move).
note
${DateTime}
and ${TimeStamp}
have been deprecated and should not be used anymore, the equivalents are ${CurrentDateTime}
and ${CurrentTimeStamp}
, respectively.
The default file event raiser comment is the following:
File event raised by "${filename}" on "${server}"
The following topics cover file events in more details:
File Event Move Directory
All DateTime
variables use the format yyyyMMddHHmmss
; you can specify a JavaDateFormat using the ${FileDateTime:HHmmss}
syntax.
${BaseDirectory}
- path to the directory containing the detected file.${BaseName}
- base filename of the detected file.${Name}
- filename of the detected file.${Dot}
- dot (``.) such as found in filenames before the extension.${Extension}
- extension of the detected file.${CurrentDateTime}
- agent date & time when the file was detected.${CurrentTimeStamp}
- agent timestamp at which the file was detected, in a numeric format containing the milliseconds since 1970, usually referred to as epoch or UNIX time.${DateTime}
- deprecated in favor ofCurrentDateTime
.${TimeStamp}
- deprecated in favor ofCurrentTimeStamp
.${FileDateTime}
- File modification date & time.${FileTimeStamp}
- File modification time in epoch.${fileName}
- filename (full path of file) of the detected file.${UniqueId}
- the unique ID of the file event.
note
${DateTime}
and ${TimeStamp}
have been deprecated and should not be used anymore, the equivalents are ${CurrentDateTime}
and ${CurrentTimeStamp}
, respectively.
Clearer Comments
The following substitution parameters are available for clearer comments in processes and chain definitions:
${jobid}
- The ID of the clearer job.${jobdescription}
- the raiser process name, as displayed by the processes monitor at the time of clearing the event.
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 as well as 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
No spaces should be entered before or after the colon (: ).
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, comm, comment | searches the documentation property. |
d, desc, description | searches the description property. |
a, application | searches the application property. |
cb, changedbefore | (internal) search for event definition that changed before a certain ISO-8601 period |
Deleting Event Definitions
You can only delete event definitions when no other objects relate to them. For example, if there are still processes or processes 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
Raise events are not displayed in the Related Objects table as these events are displayed as Raised in the event definition table.
The table in related objects contains three columns:
- Type - the type of object, like process raise event for for a raise event in a process, 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 chain definitions, will have the call-reference in Related Objects. The type will be Process Definition Raise Event or Chain Definition Raise Event, for example and the Related Object will be the name of the chain definition 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 per partition or system-wide.
The Security tab allows you to specify which users can access, edit and delete the event object.
Procedure
- Choose "Definitions > Event Definitions".
- Choose Refresh to see all existing event definitions.
- Choose New Event Definition to create an event definition.
- Fill in the details, refer to the section below.
- Choose Save and Close to save the event definition.
Example
- Choose "Definitions > Event Definitions" in the Navigation bar.
- Choose New Event Definition and fill in these values:
Event Definition Tab
Name: DataWareHouseLoaded
Description: Data Warehouse loaded
Documentation: The data warehouse has been loaded. Reports that require data from the data warehouse should wait for this event to be raised.
See Also
EventDefinition