PHP Class ezcWorkflowNodeParallelSplit, Workflow
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.
startNode->addOutNode( $split );
$nodeExec1 = ....; // create nodes for the first thread of execution here..
$nodeExec2 = ....; // create nodes for the second thread of execution here..
$disc = new ezcWorkflowNodeDiscriminator();
$disc->addInNode( $nodeExec1 );
$disc->addInNode( $nodeExec2 );
$disc->addOutNode( $workflow->endNode );
?>
显示文件
Open project: zetacomponents/workflow
Class Usage Examples
Public Methods
Method |
Description |
|
execute ( ezcWorkflowExecution $execution ) : boolean |
Activates all outgoing nodes. |
|
Method Details
Activates all outgoing nodes.
public execute ( ezcWorkflowExecution $execution ) : boolean |
$execution |
ezcWorkflowExecution |
|
return |
boolean |
true when the node finished execution,
and false otherwise |