Salesforce

The Raise Event Operation Properties (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

The Raise Event Operation Properties (Magic xpa 4.x)

The Raise Event operation is a simple operation. This topic explains the meaning and usage of the Raise Event operation properties.

Property

Description

Event

The only mandatory Raise Event property is the event it should raise. You should define the event you want to raise by zooming from the Event column or property to open the Event dialog box.

This dialog box is similar to the handler dialog box except that it only offers the following event types: System, Internal, User, and Public events. (A Raise Event operation of a Public Event refers to a user event by its name. The public event will be discussed later in this concept paper.) The other event types, Timer, Expression, and Error are not available because you do not need to raise these events explicitly.

Wait

The Wait property determines whether the Raise Event operation should be synchronous or asynchronous.

A synchronous Raise Event operation executes operations defined in the corresponding handlers immediately before the runtime engine continues to the operation following the Raise Event operation.

An asynchronous Raise Event operation does not execute the operations of corresponding handlers immediately. The raised event is entered into an event queue. The runtime engine polls the events in the event queue at defined timings. The corresponding handlers are only executed when the event is polled off the queue. The next section deals with the event Polling mechanism.

Important:

Internal event types should be raised asynchronously. If you want to raise an Internal event and to have the internal handling take effect, you should make sure that the Wait property is set to No. If you set this property to Yes, internal handling for these events is not executed.

Arguments

The Raise Event operation can pass arguments to handlers that will handle the raised event.

The list of arguments, accessible from the Raise Event Arg: field, lets you enter the arguments you want to pass to the handler.

The passed arguments can be received in the handler when you create Parameter variables inside the handler. The passed arguments are entered into the handler’s parameters according to their order, so that the first argument is entered into the first parameter, etc.

If the corresponding handler has no parameters defined, the handler does not receive the passed argument values.

In the User Events section you will learn how to declare user event parameters for easier management of the logic.

Arguments Passed by Reference – Variables passed as arguments from a synchronous Raise Event operation, where Wait=Yes, are updated by any change in the value of the corresponding parameter of the handler. If the argument passed is an expression, no new value can be returned.

Arguments Passed by Value – Variables passed as arguments from an asynchronous Raise Event operation, where Wait=No, will not be updated by changes in the value of the handler parameter.

Arguments Passed to a Propagating Handler – Arguments passed to a handler that propagates the event are also passed to the next corresponding handler. If an argument is passed by a reference, such as an argument passed as a variable from a synchronous raise event operation, and the first handler updates it, then the next handler receives the updated value. If an argument is passed by a value, such as an argument passed as an expression or passed from an asynchronous raise event operation, the next handler always receives the original value of the argument passed by the Raise Event operation.

  • When the Wait property is set to No, arguments will always be passed by value and never by reference.

  • Even if the first handler does not have parameters defined to receive the arguments, the next handler can still receive the arguments. You do not have to define the parameters in a lower handler if you only need to receive the arguments in the next handler.

Reference
Attachment 
Attachment