Events and Tasks
Events are delivered to extensions as
Tasks. Each extension incorporates its own
tasks queue for specifying events that should be processed.
There are three different categories of
- Background: These tasks are generated when a change to a domain object occurs (e.g.,
purchase requestis created or has been
- Interactive: Such tasks are created by a web call (for example a
draft purchase request validationor a
- Scheduled: These tasks are created and triggered according to a schedule that is configured for your extension.
Note that the way your extension processes a
tasks queue depends on a task category and your extension type.
The following outlines rules that apply to background tasks:
Fulfillment Automationextensions: an event generates a task only in case its associated domain object is related to a Product that is selected for your extension.
Hub Integrationextensions: an event generates a task only if a domain object is related to a Hub that is selected for your extension.
Multi Account Installationextensions: an event generates a task only in case a domain object is visible to an account that installed such an extension.
- In case a
taskfor a given domain object is in a queue (i.e., it has the
scheduledstatus) and this object is changed, additional tasks will not be created.
- If a
taskis rescheduled by the extension (i.e., your extension will process a task after a few seconds), this task will be delivered once this delay is expired.
Events that generate interactive tasks are only available for
Fulfillment Automation extensions.
Due to their nature, they are delivered immediately.
When a schedule configured for an extension is triggered, it generates a task that is related to this schedule. In case a task for the same schedule is in a queue and this schedule is triggered again, additional tasks will not be created.
Most of domain objects on CloudBlue Connect will generate an event every time they change.
An extension can receive events generated by a certain type of domain object via a list of object states. Therefore, once your selected object switches to your specified state, your extension can receive this event and perform subsequent operaions.
For example, an extension can be assigned to receive only those events when
purchase requests are switched to the