Path

ez components / documentation / api reference / 2009.2 / workflow


eZ Components 2009.2

Workflow: ezcWorkflowNodeArithmeticBase

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

Class: ezcWorkflowNodeArithmeticBase

Base class for nodes that implement simple integer arithmetic. [source]
This class takes care of the configuration and setting and getting of data. The data to manipulate is put into the $variable member. The manipulating parameter is put into the member $value.
Implementors must implement the method doExecute() and put the result of the computation in $value member variable.

Parents

ezcWorkflowNode
   |
   --ezcWorkflowNodeArithmeticBase

Descendents

Child Class Description
ezcWorkflowNodeVariableDiv Divides a workflow variable by another variable or a constant value.
ezcWorkflowNodeVariableSub Subtracts a workflow variable from another variable or a constant value.
ezcWorkflowNodeVariableDecrement This node decrements a workflow variable by one when executed.
ezcWorkflowNodeVariableMul Multiplies a workflow variable with another variable or a constant value.
ezcWorkflowNodeVariableAdd Adds a workflow variable together with another variable or a constant value.
ezcWorkflowNodeVariableIncrement This node increments a workflow variable by one when executed..

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 mixed $operand = null
Contains the operand (if any).
protected mixed $variable
Contains the data to manipulate.

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::$state
protected  ezcWorkflowNode::$threadId

Method Summary

public ezcWorkflowNodeArithmeticBase __construct( $configuration )
Constructs a new action node with the configuration $configuration.
protected abstract void doExecute( )
Implementors should perform the variable computation in this method.

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 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.
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

ezcWorkflowNodeArithmeticBase __construct( mixed $configuration )
Constructs a new action node with the configuration $configuration.
Configuration format
  • String: The name of the workflow variable to operate on.
  • Array:
    • name: The name of the workflow variable to operate on.
    • operand: Name of workflow variable or a numerical value. Not used by implementations without an operand.

Parameters

Name Type Description
$configuration mixed  

Throws

ClassDescription
ezcWorkflowDefinitionStorageException

Redefinition of

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

doExecute

void doExecute( )
Implementors should perform the variable computation in this method.
doExecute() is called automatically by execute().

Redefined in descendants as

Method Description
ezcWorkflowNodeVariableDiv::doExecute() Perform variable modification.
ezcWorkflowNodeVariableSub::doExecute() Perform variable modification.
ezcWorkflowNodeVariableDecrement::doExecute() Perform variable modification.
ezcWorkflowNodeVariableMul::doExecute() Perform variable modification.
ezcWorkflowNodeVariableAdd::doExecute() Perform variable modification.
ezcWorkflowNodeVariableIncrement::doExecute() Perform variable modification.

Last updated: Mon, 21 Dec 2009