PHP 클래스 ezcWorkflowNodeSimpleMerge, Workflow

The Simple Merge workflow pattern is to be used to merge the possible paths that are defined by a preceding Exclusive Choice. It is assumed that of these possible paths exactly one is taken and no synchronization takes place. Use Case Example: After the payment has been performed by either credit card or bank transfer, the order can be processed further. Incoming nodes: 2..* Outgoing nodes: 1 This example displays how you can use a simple merge to tie together two different execution paths from an exclusive choice into one. new ezcWorkflowConditionIsInt ) ); $workflow->startNode->addOutNode( $input ); create the exclusive choice branching node $choice = new ezcWorkflowNodeExclusiveChoice; $intput->addOutNode( $choice ); $branch1 = ....; // create nodes for the first branch of execution here.. $branch2 = ....; // create nodes for the second branch of execution here.. add the outnodes and set the conditions on the exclusive choice $choice->addConditionalOutNode( new ezcWorkflowConditionVariable( 'value', new ezcWorkflowConditionGreatherThan( 10 ) ), $branch1 ); $choice->addConditionalOutNode( new ezcWorkflowConditionVariable( 'value', new ezcWorkflowConditionLessThan( 11 ) ), $branch2 ); Merge the two branches together and continue execution. $merge = new ezcWorkflowNodeSimpleMerge(); $merge->addInNode( $branch1 ); $merge->addInNode( $branch2 ); $merge->addOutNode( $workflow->endNode ); ?>
상속: extends ezcWorkflowNodeMerge
파일 보기 프로젝트 열기: zetacomponents/workflow 1 사용 예제들

공개 메소드들

메소드 설명
activate ( ezcWorkflowExecution $execution, ezcWorkflowNode $activatedFrom = null, integer $threadId ) Activate this node.
execute ( ezcWorkflowExecution $execution ) : boolean Executes this node.

메소드 상세

activate() 공개 메소드

Activate this node.
public activate ( ezcWorkflowExecution $execution, ezcWorkflowNode $activatedFrom = null, integer $threadId )
$execution ezcWorkflowExecution
$activatedFrom ezcWorkflowNode
$threadId integer

execute() 공개 메소드

Executes this node.
public execute ( ezcWorkflowExecution $execution ) : boolean
$execution ezcWorkflowExecution
리턴 boolean true when the node finished execution, and false otherwise