Defines an event handler.
A Handler is similar to a Function except that it is automatically executed when the associated event occurs. Events that can be associated with it are:
• Transaction starting event, which is fired when Convertigo starts executing the client request to a transaction,
• XML generated event, which is fired when Convertigo has generated the XML response, just before the transaction ends.
Notes:
• A Handler contains other statements that define the actions to be performed. It can return a result value (empty string by default). If cancel is returned by the Transaction starting Handler, the rest of the transaction execution is canceled.
• Handlers can only be added to a transaction, one Handler of each event type per transaction.
Property | Type | Category | Description |
---|---|---|---|
Comment | String | standard | Describes the object comment to include in the documentation report. This property generally contains an explanation about the object. |
Event type | String | standard | Defines the handler associated event type. Handlers can be associated to the following event types: • TransactionStarted event type: executed when the transaction start event occurs, • XmlGenerated event type: executed when the XML generated event occurs. |
Infinite loop protection | boolean | standard | Defines whether the handler should be protected against infinite loops in transaction. If set to true (default value), the handler prevents infinite loops by throwing a Convertigo Engine exception when an infinite loop is detected. Default value should not be changed unless you specifically want the handler to authorize loops in transaction. |
Is active | boolean | standard | Defines whether the statement is active. |
Result | String | standard | Defines the handler’s default resulting value. Depending on the Event type, this property can be chosen among several available values. For a Transaction starting Handler, this property can take the following values: • <empty> or "": continues the transaction execution, • cancel: stops the transaction and cancels the rest of the transaction execution. Note: The Handler’s default return value defined thanks to this property can be overridden by a child Return statement. |