ez.no / exponential / documentation / development / extensions / workflow events / introduction to events
It is often necessary to extend the workflow system to create new events. This can be events to update remote servers with SOAP, integration with credit card companies and so on.
The workflow will default run sequential through the events, but we can manipulate this path to repeat an event, wait or abort the workflow. This is all done with the status of the event.
An event has always got a status. The event goes through various code and returns a status. The status decides if the event should be repeated, if we should show a template, if the workflow should wait, continue or abort.
|
Status |
Description |
|---|---|
|
EZ_WORKFLOW_TYPE_STATUS_ACCEPTED |
Workflow accepts that event, and run next event in workflow |
|
EZ_WORKFLOW_TYPE_STATUS_REJECTED |
They have the same meaning currently. The workflow will be cancelled |
|
EZ_WORKFLOW_TYPE_STATUS_DEFERRED_TO_CRON |
This status means that execution of the workflow is deferred to the cron daemon. The difference between the first one and the second one is that the workflow will be executed from the next event in the first case and from the same event in the second case after finishing current running process |
|
EZ_WORKFLOW_TYPE_STATUS_FETCH_TEMPLATE |
The workflow engine should interrupt executing workflow and show page to the user. In case of this status, the workflow event should set up some internal variables. Differences between them is the same as in the previous case |
|
EZ_WORKFLOW_TYPE_STATUS_REDIRECT |
Workflow engine should interrupt executing the workflow and redirect the user to a specified page. In case of this status the workflow event should set up some internal variables. Differences between them is the same as in the previous cases |
|
EZ_WORKFLOW_TYPE_STATUS_NONE |
Undefined status. The same as EZ_WORKFLOW_TYPE_STATUS_REJECTED temporally |
Log in or create a user account to comment.
Comments