PHP 클래스 ezcWorkflowNodeSubWorkflow, Workflow

When the node is reached during execution of the workflow, the specified sub-workflow is started. The original workflow is suspended until the sub-workflow has finished executing. Incoming nodes: 1 Outgoing nodes: 1 The example below creates a sub-workflow node that passes the parent execution's variable 'x' to the variable 'y' in the child execution when the sub-workflow is started. When it ends, the child execution's 'y' variable is passed to the parent execution as 'z'. 'IncrementVariable', 'variables' => array( 'in' => array( 'x' => 'y' ), 'out' => array( 'y' => 'z' ) ) ) ); ?>
상속: extends ezcWorkflowNode
파일 보기 프로젝트 열기: zetacomponents/workflow 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$state integer Execution ID of the sub workflow, 0 if it has not been started yet.

공개 메소드들

메소드 설명
__construct ( mixed $configuration ) Constructs a new sub workflow with the configuration $configuration.
__toString ( ) : string Returns a textual representation of this node.
configurationFromXML ( DOMElement $element ) : array Generate node configuration from XML representation.
configurationToXML ( DOMElement $element ) Generate XML representation of this node's configuration.
execute ( ezcWorkflowExecution $execution ) : boolean Executes this node.

보호된 메소드들

메소드 설명
passVariables ( ezcWorkflowExecution $from, ezcWorkflowExecution $to, array $variables ) Passes variables from one execution context to another.

메소드 상세

__construct() 공개 메소드

Configuration format
  • String: The name of the workflow to execute. The workflow is loaded using the loadByName method on the execution engine.
  • Array:
    • workflow: The name of the workflow to execute. The workflow is loaded using the loadByName method on the execution engine.
    • variables: An array with the information for mapping workflow variables between parent and child workflow execution.
public __construct ( mixed $configuration )
$configuration mixed

__toString() 공개 메소드

Returns a textual representation of this node.
public __toString ( ) : string
리턴 string

configurationFromXML() 공개 정적인 메소드

Generate node configuration from XML representation.
public static configurationFromXML ( DOMElement $element ) : array
$element DOMElement
리턴 array

configurationToXML() 공개 메소드

Generate XML representation of this node's configuration.
public configurationToXML ( DOMElement $element )
$element DOMElement

execute() 공개 메소드

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

passVariables() 보호된 메소드

Passes variables from one execution context to another.
protected passVariables ( ezcWorkflowExecution $from, ezcWorkflowExecution $to, array $variables )
$from ezcWorkflowExecution The execution context the variables are passed from.
$to ezcWorkflowExecution The execution context the variables are passed to.
$variables array The names of the variables.

프로퍼티 상세

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

Execution ID of the sub workflow, 0 if it has not been started yet.
protected int $state
리턴 integer