action await notification, actionawaitnotification, kPMActionActionAwaitNotification — Wait for a notification.


action await notification structure { type, scope, notification, context };
type : string, choice
scope : string, choice, default, optional
notification : string, length 1..1024
context : dictionary, default, optional


Wait for a notification.

The next action will not be performed until the specified notification is observed.


type. Type of action to perform.

type is a string. type must be await notification, kPMActionType_AwaitNotification.

scope. Observe notifications within this scope.

Only notifications posted with the observed scope will cause the action to continue.

scope is a string. If scope is omitted, the default host is used. scope is optional. scope must be one of the following two constants:

  • engine, kPMActionScope_Engine.
  • host, kPMActionScope_Host.

notification. Notification to observe.

Process wide notifications are posted as strings. Notifications should follow a reverse domain name format to avoid namespace collisions.

notification is a string. notification must be between 1 and 1024 characters long, inclusive.

context. Continue if notification's context matches this context.

A notification can be accompanied by a context dictionary. If the action includes a context, only notifications matching both the notification and context will cause the action to continue.

context is a dictionary. If context is omitted, a default is created. context is optional.