Events, messages and notifications

The relay processes use the task event creation capability to create events, set task messages and set or reset the action required flag. The processes then consume published event messages to create notifications.

The event creation uses both the message field and a description field. These have different roles. The message field is used to set the worker message (shown as Last message on the task display) and as the content of any notifications. The descrption field forms the text content of the event, and appears in the log. In many cases these are the same, but sometimes it makes sense to have a short general message (such as "Chat received") and a longer description (the text of the chat).

The processing uses the following conventions:

  • The message field is used to set the worker message, and the presence of the message is used to trigger a notification.
  • The description field is used to set the event description. This defaults to the message. If an event has only a description and not a message, an event is created but the worker message is not set an no notification is triggered.
  • Forms that gather user input (for example, the form used to send a task) typically call a user-inputted text "message". This is typically used as the event description field (i.e. the content of the event) rather than the message used when creating the event. The message used when creating the event tends to be fixed (such as "You have received a new task") rather than the potentially longer user-entered message which becomes the event description.
  • The ofInterest indicator is set automatically whenever an event is created with a message, and is used to indicate there is an unread message.
  • The actionRequired indicator is set to indicate a task action is required, typically because something is sent from the other party.

Event types

Events are used to record activity in a process. Each event has an event type, which is used to classify the event. Event types are specified as reference/Name string. Different step types use different default event types.

The Task step type creates an event when the status changes or when the assignment status changes (which changes the status name). In these cases, status-changing tasks use an event type the same as the status. Assignment changes use an event type based on the assignment status with the word "assignment" prepended, for example the assignment status "received" is shown as the event type "assignmentReceived/Received".

After they are created, an event is published so that other steps can respond to the event, for example by sending data to Insight, or by creating sub events to provide more detail about the first event. The event type can provide more information for analysis and can provide a basis for creating sub events.