PHP 클래스 ezcWorkflowNodeExclusiveChoice, Workflow

The Exclusive Choice workflow pattern defines multiple possible paths for the workflow of which exactly one is chosen based on the conditions set for the out nodes. Incoming nodes: 1 Outgoing nodes: 2..* This example displays how you can use an exclusive choice to select one of two possible branches depending on the workflow variable 'value' which is read using an input node. 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 ezcWorkflowConditionGreaterThan( 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 ezcWorkflowNodeConditionalBranch
파일 보기 프로젝트 열기: zetacomponents/workflow 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$maxActivatedConditionalOutNodes integer Constraint: The maximum number of conditional outgoing nodes this node may activate. Set to false to disable this constraint.
$minActivatedConditionalOutNodes integer Constraint: The minimum number of conditional outgoing nodes this node has to activate. Set to false to disable this constraint.
$minConditionalOutNodes integer Constraint: The minimum number of conditional outgoing nodes this node has to have. Set to false to disable this constraint.

프로퍼티 상세

$maxActivatedConditionalOutNodes 보호되어 있는 프로퍼티

Constraint: The maximum number of conditional outgoing nodes this node may activate. Set to false to disable this constraint.
protected int $maxActivatedConditionalOutNodes
리턴 integer

$minActivatedConditionalOutNodes 보호되어 있는 프로퍼티

Constraint: The minimum number of conditional outgoing nodes this node has to activate. Set to false to disable this constraint.
protected int $minActivatedConditionalOutNodes
리턴 integer

$minConditionalOutNodes 보호되어 있는 프로퍼티

Constraint: The minimum number of conditional outgoing nodes this node has to have. Set to false to disable this constraint.
protected int $minConditionalOutNodes
리턴 integer