Path

ez components / documentation / api reference / 2009.2 / workflow


eZ Components 2009.2

Workflow: ezcWorkflowNodeParallelSplit

[ Tutorial ] [ Theoretical background ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcWorkflowNodeParallelSplit

This node implements the Parallel Split workflow pattern. [source]
The Parallel Split workflow pattern divides one thread of execution unconditionally into multiple parallel threads of execution.
Use Case Example: After the credit card specified by the customer has been successfully charged, the activities of sending a confirmation email and starting the shipping process can be executed in parallel.
Incoming nodes: 1 Outgoing nodes: 2..*
This example creates a workflow that splits in two parallel threads which are joined again using a ezcWorkflowNodeDiscriminator.
 1.  <?php
 2.  $workflow new ezcWorkflow'Test' );
 3.  
 4.  $split new ezcWorkflowNodeParallelSplit();
 5.  $workflow->startNode->addOutNode$split );
 6.  $nodeExec1 = ....// create nodes for the first thread of execution here..
 7.  $nodeExec2 = ....// create nodes for the second thread of execution here..
 8.  
 9.  $disc new ezcWorkflowNodeDiscriminator();
10.  $disc->addInNode$nodeExec1 );
11.  $disc->addInNode$nodeExec2 );
12.  $disc->addOutNode$workflow->endNode );
13.  ?>

Parents

ezcWorkflowNode
   |
   --ezcWorkflowNodeBranch
      |
      --ezcWorkflowNodeParallelSplit

Inherited Constants

From ezcWorkflowNode:
ezcWorkflowNode::WAITING_FOR_ACTIVATION    The node is waiting to be activated.
ezcWorkflowNode::WAITING_FOR_EXECUTION    The node is activated and waiting to be executed.

Inherited Member Variables

From ezcWorkflowNodeBranch:
protected  ezcWorkflowNodeBranch::$maxOutNodes
protected  ezcWorkflowNodeBranch::$minOutNodes
protected  ezcWorkflowNodeBranch::$startNewThreadForBranch
From ezcWorkflowNode:
protected  ezcWorkflowNode::$activatedFrom
protected  ezcWorkflowNode::$activationState
protected  ezcWorkflowNode::$configuration
protected  ezcWorkflowNode::$id
protected  ezcWorkflowNode::$inNodes
protected  ezcWorkflowNode::$internalCall
protected  ezcWorkflowNode::$maxInNodes
protected  ezcWorkflowNode::$minInNodes
protected  ezcWorkflowNode::$numInNodes
protected  ezcWorkflowNode::$numOutNodes
protected  ezcWorkflowNode::$outNodes
protected  ezcWorkflowNode::$state
protected  ezcWorkflowNode::$threadId

Inherited Methods

From ezcWorkflowNodeBranch :
protected boolean ezcWorkflowNodeBranch::activateOutgoingNodes()
Activates this node's outgoing nodes.
From ezcWorkflowNode :
public ezcWorkflowNode ezcWorkflowNode::__construct()
Constructs a new node with the configuration $configuration.
public void ezcWorkflowNode::accept()
Reimplementation of accept() calls accept on all out nodes.
protected void ezcWorkflowNode::activateNode()
Convenience method for activating an (outgoing) node.
public ezcWorkflowNode ezcWorkflowNode::addInNode()
Adds a node to the incoming nodes of this node.
public ezcWorkflowNode ezcWorkflowNode::addOutNode()
Adds a node to the outgoing nodes of this node.
public mixed ezcWorkflowNode::getConfiguration()
Returns the configuration of this node.
public ezcWorkflowNode[] ezcWorkflowNode::getInNodes()
Returns the incoming nodes of this node.
public ezcWorkflowNode[] ezcWorkflowNode::getOutNodes()
Returns the outgoing nodes of this node.
public boolean ezcWorkflowNode::removeInNode()
Removes a node from the incoming nodes of this node.
public boolean ezcWorkflowNode::removeOutNode()
Removes a node from the outgoing nodes of this node.
public void ezcWorkflowNode::verify()
Checks this node's constraints.
Last updated: Mon, 21 Dec 2009