an obligation policy that performs Event, Condition, Action rules for the SMC
Operation | Return | Description |
canExecute: anEvent |
P2Boolean |
answers true if anEvent has the values that satisfy all the policy's conditions |
threads |
self |
Tells the policy to perform all actions as separate threads in parallel |
execute: anEvent |
self |
executes all the actions using anEvent. AnEvent is given to every action defined for the policy. Actions may be executed in parallel. Statements within an action block are executed serially. Answers the receiver. This policy is the source for the action blocks |
value: anEvent |
self |
executes all the actions using anEvent. AnEvent is given to every action defined for the policy. Different actions could be executed in parallel. Statements within an action block are executed serially. Answers the receiver. This message makes the policy look like a block with the source being the caller. |
event: anEventTemplate |
P2Object |
Sets anEventTemplate to be the type of event that this policy should be triggered by. Answers anEventTemplate. |
condition: aBlock |
P2Object |
adds aBlock to the list of conditions of the policy. Answers aBlock. |
action: aBlock |
P2Object |
adds aBlock to the list of actions of the policy. Answers aBlock. |
eaction: aBlock |
P2Object |
adds aBlock to the list of actions to be handed the whole event when it occurs. Answers aBlock. |
onError: anErrorBlock |
self |
associates anErrorBlock with the receiver. The error block is executed if a Ponder2 error occurs in the receiver. The error block is given one P2Error argument which contains the error details. |