Sebastian Bergmann schrieb:
>> I mean setting a variable by ezcWorkflowExecution::setVariable().
>> There is no condition check.
> 
>   Of course not. ezcWorkflowExecution::setVariable() is only called
>   by the Workflow engine itself. You should not call it from outside
>   the Workflow engine. 

I'm using an ezcWorkflowServiceObject-Object like the tutorials 
MyServiceObject.

MyServiceObject::execute() contains this lines:
  15.         // Manipulate the workflow.
  16.         // Does not affect the workflow, for illustration only.
  17.         $execution->setVariable( 'choice', true );

 From this point i thought setting the variable by this way is commonly.
But now you say it shouldn't called so? Right?



>   Now I see what you mean; you set a variable using a Set node before you
>   require it in an Input node.
> 
>   I will spare you the "Why are you doing this?" question here. I will
>   look into this.

The set node was just for explanation. Instead of the Set node, there 
are working Action Nodes.
My intention is to give workflow data through several Action nodes using 
the workflow itsself. So Action nodes are using workflow variables for 
holding/sharing workflow data. Stupid?

The input node i used should act as filter for such a workflow data 
variable - i thought.

With Action node, the example would be:

//////////////////////////////////////////////////////
// $this is a subclass of ezcWorkflow

//
// MyServiceObject sets the workflow variable 'intVar'
// to the value 'stringVal'
// - like in tutorials MyServiceObject::execute()
//
$set = new ezcWorkflowNodeAction(
               array(
                  'class' => 'MyServiceObject',
                  'arguments' => array()
               )
            );
$this->startNode->addOutNode($set);

$input = new ezcWorkflowNodeInput(
                 array(
                    'intVar' => new ezcWorkflowConditionIsInteger()
                 )
              );
$set->addOutNode($input);

$input->addOutNode($this->endNode);

//////////////////////////////////////////////////////
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to