Salesforce

Raising Events (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Raising Events (Magic xpa 4.x)

The Raise Event Operation

You can explicitly trigger events by utilizing the Raise Event operation.

In general, the Raise Event operation is a request by the developer to execute handlers that are defined for an event at a given time. The handler can either be user-defined or a Magic xpa built-in handler.

Invoking an Internal Handler

A Raise Event operation for an Internal event type can invoke the corresponding internal handling for that event. For example, a Raise Event operation for the Next Record Internal event invokes the corresponding internal handler for this event, and the running task tries to move to the next record. Using this technique you can explicitly execute predefined engine handlers to create a task’s required state.

Invoking a User-defined Handler

If you want to execute a set of operations in different parts of the task or project, you do not need to write the same set of operations at every location. You can place the set wherever you want to execute this set of operations. In this way you are using predefined logic.

Clarifying Your Logic

Even if the set of operations you want to execute should be executed at a single location or time, it is still preferable to write the set of operations in a handler invoked by a Raise Event operation. This lets you differentiate this set of operations, and your project logic will be more organized and understandable for other developers.

In this section, you can find information about the following:

Reference
Attachment 
Attachment