Salesforce

Event Behavior (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Event Behavior (Magic xpa 4.x)

Every time an event is raised, it enters an event queue of the running context.

Magic xpa polls the event queue for pending events at the following timings:

  • Online, Rich Client and Browser tasks:

The end user presses any key.

The task is idle. This occurs when the task is waiting for end-user input and the Keyboard Idle Seconds environment setting time-out occurs.

  • Batch task – Every passed time interval according to the Batch Event Interval environment setting, or every number of processed records according to the Record Event Interval in the Task Properties dialog box.

  • When the Raise Event operation is used (for any Task Type).

    The Magic xpa engine checks the Raise Event operation's execution condition. If you use the Raise Event operation with the Wait parameter set to Yes, Magic xpa will find and execute the related event handler immediately. If the Wait parameter is set to No, the event will be added to an event queue and will be inspected according to the task type as described above.

For each event that is polled from the event queue Magic xpa searches for a handler that is defined for the event. Whenever a handler for this event is found Magic xpa executes the handler.

Upon completion of the handler, Magic xpa looks for the next matching handler only if the Propagate property of the last executed handler is set to Yes or evaluated to True. Note that the when the Propagate property is set, Magic xpa looks for the next handler set for the same event as the previous handler. In the case when Event A triggered Event B and the handler on Event B was found and executed, the propagate command is done only for Event B and not for Event A.

Magic xpa looks for the matching handlers through the entire handler list from the current task up to the main program and from the bottom of each handler list to its top. This means that if there are two handlers of the same event in the same task the bottom handler is executed first.

User events cannot be propagated.

Related Topics

Reference
Attachment 
Attachment