<< Permissions  Data storage >> 

Workflows

Class diagram


State diagram


Database diagram


Workflows are triggered by the runTrigger function. The code may look like this: (like in 'content/edit.php')
if ( $Module->isCurrentAction( 'publish' ) )
{
    $workflowParameters = array( 'contentobject' => $object,
                                 'session' => $currentSession,
                                 'user' => $currentUser
                                 );
    if ( eZTrigger::runTrigger( 'content', 'publish', 'before' , $workflowParameters) == 'done' )
    {
        $object->publish();
        eZTrigger::runTrigger( 'content', 'publish', 'after', $workflowParameters);
    }
}
Here is how the runTrigger function should work:
  • Find out if there is a workflow connected to this function
  • Find out if there is already started a workflow process for the same event.
  • If so start the next event
  • If not create new workflow process and start it

If to look to the publish process. Multiplesor workflow looks to parameters and decide what workflow to run next if need it. And shows user a page saying for instance that the object is sent for approval.

Example of Publish workflow

Example of Checkout workflow


Exponential