PHP Класс 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 );
?>
Показать файл
Открыть проект
Примеры использования класса
Открытые методы
Метод |
Описание |
|
execute ( ezcWorkflowExecution $execution ) : boolean |
Activates all outgoing nodes. |
|
Описание методов
execute()
публичный Метод
Activates all outgoing nodes.
public execute ( ezcWorkflowExecution $execution ) : boolean |
$execution |
ezcWorkflowExecution |
|
Результат |
boolean |
true when the node finished execution,
and false otherwise |