Path

ez components / documentation / api reference / 2007.2 / workflow


Workflow: ezcWorkflowNodeSubWorkflow

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcWorkflowNodeSubWorkflow

An object of the ezcWorkflowNodeSubWorkflow class represents a sub-workflow. [source]
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'.
 1.  $subWorkflow new ezcWorkflowNodeSubWorkflow(
 2.    array(
 3.      'workflow'  => 'IncrementVariable',
 4.      'variables' => array(
 5.        'in' => array(
 6.          'x' => 'y'
 7.        ),
 8.        'out' => array(
 9.          'y' => 'z'
10.        )
11.      )
12.    )
13.  );

Parents

ezcWorkflowNode
   |
   --ezcWorkflowNodeSubWorkflow

Inherited Constants

From ezcWorkflowNode:
ezcWorkflowNode::WAITING_FOR_ACTIVATION    The node is waiting to be activated.
ezcWorkflowNode::WAITING_FOR_EXECUTION    The node is activated and waiting to be executed.

Member Variables

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

Inherited Member Variables

From ezcWorkflowNode:
protected  ezcWorkflowNode::$activatedFrom
protected  ezcWorkflowNode::$activationState
protected  ezcWorkflowNode::$configuration
protected  ezcWorkflowNode::$id
protected  ezcWorkflowNode::$inNodes
protected  ezcWorkflowNode::$internalCall
protected  ezcWorkflowNode::$maxInNodes
protected  ezcWorkflowNode::$maxOutNodes
protected  ezcWorkflowNode::$minInNodes
protected  ezcWorkflowNode::$minOutNodes
protected  ezcWorkflowNode::$numInNodes
protected  ezcWorkflowNode::$numOutNodes
protected  ezcWorkflowNode::$outNodes
protected  ezcWorkflowNode::$threadId

Method Summary

public ezcWorkflowNodeSubWorkflow __construct( $configuration )
Constructs a new sub workflow with the configuration $configuration.
public static void configurationFromXML( $element )
Generate node configuration from XML representation.
public void configurationToXML( $element )
Generate XML representation of this node's configuration.

Inherited Methods

From ezcWorkflowNode :
public ezcWorkflowNode ezcWorkflowNode::__construct()
Constructs a new node with the configuration $configuration.
public void ezcWorkflowNode::accept()
Reimplementation of accept() calls accept on all out nodes.
protected void ezcWorkflowNode::activateNode()
Convenience method for activating an (outgoing) node.
public ezcWorkflowNode ezcWorkflowNode::addInNode()
Adds a node to the incoming nodes of this node.
public ezcWorkflowNode ezcWorkflowNode::addOutNode()
Adds a node to the outgoing nodes of this node.
public static void ezcWorkflowNode::configurationFromXML()
Generate node configuration from XML representation.
public void ezcWorkflowNode::configurationToXML()
Generate XML representation of this node's configuration.
public mixed ezcWorkflowNode::getConfiguration()
Returns the configuration of this node.
public ezcWorkflowNode[] ezcWorkflowNode::getInNodes()
Returns the incoming nodes of this node.
public ezcWorkflowNode[] ezcWorkflowNode::getOutNodes()
Returns the outgoing nodes of this node.
protected void ezcWorkflowNode::initState()
Initializes the state of this node.
public boolean ezcWorkflowNode::removeInNode()
Removes a node from the incoming nodes of this node.
public boolean ezcWorkflowNode::removeOutNode()
Removes a node from the outgoing nodes of this node.
public void ezcWorkflowNode::verify()
Checks this node's constraints.

Methods

__construct

ezcWorkflowNodeSubWorkflow __construct( mixed $configuration )
Constructs a new sub workflow with the configuration $configuration.
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.

Parameters

Name Type Description
$configuration mixed  

Redefinition of

Method Description
ezcWorkflowNode::__construct() Constructs a new node with the configuration $configuration.

configurationFromXML

void configurationFromXML( $element )
Generate node configuration from XML representation.

Parameters

Name Type Description
$element DOMElement  

Redefinition of

Method Description
ezcWorkflowNode::configurationFromXML() Generate node configuration from XML representation.

configurationToXML

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

Parameters

Name Type Description
$element DOMElement  

Redefinition of

Method Description
ezcWorkflowNode::configurationToXML() Generate XML representation of this node's configuration.

Last updated: Mon, 17 Dec 2007