PHP Class ezcWorkflowNodeInput, Workflow
When the node is reached, the workflow engine will suspend the workflow execution if the
specified input data is not available (first activation). While the workflow is suspended,
the application that embeds the workflow engine may supply the input data and resume the workflow
execution (second activation of the input node). Input data is stored in a workflow variable.
Incoming nodes: 1
Outgoing nodes: 1
This example creates a simple workflow that expectes two input variables,
once which can be any value and another that can only be an integer between
one and ten.
new ezcWorkflowConditionIsAnything,
'intVar' => new ezcWorkflowConditionAnd(
array(
new ezcWorkflowConditionIsInteger,
new ezcWorkflowConditionIsGreatherThan( 0 )
new ezcWorkflowConditionIsLessThan( 11 )
)
)
);
$input->addOutNode( $workflow->endNode );
$workflow->startNode->addOutNode( $input );
?>
Show file
Open project: zetacomponents/workflow
Class Usage Examples
Public Methods
Method |
Description |
|
__construct ( mixed $configuration = '' ) |
Constructs a new input 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. |
|
Method Details
__construct()
public method
An input node accepts an array of workflow variables to accept
and/or together with a condition on the variable if required.
Each element in the configuration array must be either
String: The name of the workflow variable to require. No conditions.
or
- Key: The name of the workflow variable to require.
- Value: An object of type ezcWorkflowCondition
configurationFromXML()
public static method
Generate node configuration from XML representation.
configurationToXML()
public method
Generate XML representation of this node's configuration.
public execute ( ezcWorkflowExecution $execution ) : boolean |
$execution |
ezcWorkflowExecution |
|
return |
boolean |
true when the node finished execution,
and false otherwise |