[Components] Node activates less conditional outgoing nodes than required
Hi, I have the workflow: http://ftp.margusja.pri.ee/demowf.png I presume if I can create and execute the workflow then I might to resume it. I have simple the code . almost copy paste from the documentation. 1 points = $points; 16 $this->variableName = __CLASS__; 17 $this->choice = array( 18 array('start' => 0, 'end' => 17, 'score' => 1000), 19 array('start' => 18, 'end' => 24, 'score' => 20), 20 array('start' => 66, 'end' => 150, 'score' => 1000) 21 ); 22 } 23 public function execute( ezcWorkflowExecution $execution ){ 24 print $this->points; 25 return true; 26 } 27 public function __toString() { 28 return $this->variableName; 29 } 30 } 31 32 33 // Set up database connection. 34 $db = ezcDbFactory::create( 'mysql://dbusert:dbpa...@localhost/mehis_ezwf' ); 35 36 // Set up database-based workflow executer. 37 $execution = new ezcWorkflowDatabaseExecution( $db, 34 ); 38 39 // Resume workflow execution. 40 $execution->resume( 41 array( 'age' => 10 ) 42 ); 43 ?> If I try to resume my workflow I'll get: 1000 Fatal error: Uncaught exception 'ezcWorkflowExecutionException' with message 'Node activates less conditional outgoing nodes than required.' in /var/www/arendus/mehis/big/library/ezcomponents/Workflow/src/interfaces/node_conditional_branch.php:174 Stack trace: #0 /var/www/arendus/mehis/big/library/ezcomponents/Workflow/src/interfaces/execution.php(494): ezcWorkflowNodeConditionalBranch->execute(Object(ezcWorkflowDatabaseExecution)) #1 /var/www/arendus/mehis/big/library/ezcomponents/Workflow/src/interfaces/execution.php(367): ezcWorkflowExecution->execute() #2 /var/www/arendus/mehis/big/exec.php(42): ezcWorkflowExecution->resume(Array) #3 {main} thrown in /var/www/arendus/mehis/big/library/ezcomponents/Workflow/src/interfaces/node_conditional_branch.php on line 179 Any hint? I see the main problem is: Node activates less conditional outgoing nodes than required But how. I have a correct workflow and the relations between nodes. digraph mtest { node1 [label="Start", color="#2e3436"] node3 [label="Input", color="#2e3436"] node4 [label="Exclusive Choice", color="#2e3436"] node5 [label="Class "age" not found.", color="#2e3436"] node6 [label="Simple Merge", color="#2e3436"] node7 [label="Input", color="#2e3436"] node8 [label="Exclusive Choice", color="#2e3436"] node9 [label="Class "income" not found.", color="#2e3436"] node10 [label="Simple Merge", color="#2e3436"] node2 [label="End", color="#2e3436"] node11 [label="Class "income" not found.", color="#2e3436"] node12 [label="Class "income" not found.", color="#2e3436"] node13 [label="Class "income" not found.", color="#2e3436"] node14 [label="Class "income" not found.", color="#2e3436"] node15 [label="Class "age" not found.", color="#2e3436"] node16 [label="Class "age" not found.", color="#2e3436"] node1 -> node3 node3 -> node4 node4 -> node5 [label="age ( > 0 && <= 17 )"] node4 -> node15 [label="age ( > 18 && <= 24 )"] node4 -> node16 [label="age ( > 66 && <= 150 )"] node5 -> node6 node6 -> node7 node7 -> node8 node8 -> node9 [label="income ( > 0 && <= 3000 )"] node8 -> node11 [label="income ( > 3001 && <= 7000 )"] node8 -> node12 [label="income ( > 7001 && <= 11000 )"] node8 -> node13 [label="income ( > 11001 && <= 25000 )"] node8 -> node14 [label="income ( > 25000 && <= 99 )"] node9 -> node10 node10 -> node2 node11 -> node10 node12 -> node10 node13 -> node10 node14 -> node10 node15 -> node6 node16 -> node6 } -- Regards Margusja Phone: +372 51 48 780 MSN: margu...@kodila.ee skype: margusja web: http://margusja.pri.ee -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components
Re: [Components] Uncaught exception 'ezcWorkflowInvalidInputException' with message 'children == '
Found a solution Updated a library to 2009.2.1 Release date: Monday, March 22nd, 2010 Tervitades, Margusja +3725148780 http://margusja.pri.ee skype: margusja msn: margu...@kodila.ee margusja wrote: > Hi, > > I have simple workflow > > $input = new ezcWorkflowNodeInput( > array( 'children' => new ezcWorkflowConditionAnd( > array( > new ezcWorkflowConditionIsGreaterThan ( 0 ), > new ezcWorkflowConditionIsLessThan( 31 ) > ) > ))); > > $workflow->startNode->addOutNode( $input ); > > $branch = new ezcWorkflowNodeExclusiveChoice; > $branch->addInNode( $input ); > > $node10p = new ezcWorkflowNodeAction(array( "class" => "Children", > "arguments" => array("1" => "10p"))); > $node20p = new ezcWorkflowNodeAction(array( "class" => "Children", > "arguments" => array("2" => "20p"))); > $node30p = new ezcWorkflowNodeAction(array( "class" => "Children", > "arguments" => array("3" => "30p"))); > > $condition1 = new ezcWorkflowConditionVariable('children', new > ezcWorkflowConditionIsEqual(11) ); > $branch->addConditionalOutNode($condition1, $node10p ); > > ... > > > I can start my workflow and I'll get workwlow ID > > Then I try to resume it: > $execution = new ezcWorkflowDatabaseExecution( $db, ID ); > $execution->resume(array('children' => 31)); > Then I get: > Fatal error: Uncaught exception 'ezcWorkflowInvalidInputException' with > message 'children == ' in > /usr/share/pear/ezc/Workflow/interfaces/execution.php:359 Stack trace: > #0 /var/www/arendus/margusja/ecwf/demowf_continue.php(41): > ezcWorkflowExecution->resume(Array) #1 {main} thrown in > /usr/share/pear/ezc/Workflow/interfaces/execution.php on line 359 > > As much I understand in class ezcWorkflowConditionIsEqual extends > ezcWorkflowConditionComparison method evaluate doesn't give a proper > response. > I checked: > > public function evaluate( $value ) > { > return $value == $this->value; > } > > There is no value in $this->value > > Any hint? > > -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components
[Components] Uncaught exception 'ezcWorkflowInvalidInputException' with message 'children == '
Hi, I have simple workflow $input = new ezcWorkflowNodeInput( array( 'children' => new ezcWorkflowConditionAnd( array( new ezcWorkflowConditionIsGreaterThan ( 0 ), new ezcWorkflowConditionIsLessThan( 31 ) ) ))); $workflow->startNode->addOutNode( $input ); $branch = new ezcWorkflowNodeExclusiveChoice; $branch->addInNode( $input ); $node10p = new ezcWorkflowNodeAction(array( "class" => "Children", "arguments" => array("1" => "10p"))); $node20p = new ezcWorkflowNodeAction(array( "class" => "Children", "arguments" => array("2" => "20p"))); $node30p = new ezcWorkflowNodeAction(array( "class" => "Children", "arguments" => array("3" => "30p"))); $condition1 = new ezcWorkflowConditionVariable('children', new ezcWorkflowConditionIsEqual(11) ); $branch->addConditionalOutNode($condition1, $node10p ); ... I can start my workflow and I'll get workwlow ID Then I try to resume it: $execution = new ezcWorkflowDatabaseExecution( $db, ID ); $execution->resume(array('children' => 31)); Then I get: Fatal error: Uncaught exception 'ezcWorkflowInvalidInputException' with message 'children == ' in /usr/share/pear/ezc/Workflow/interfaces/execution.php:359 Stack trace: #0 /var/www/arendus/margusja/ecwf/demowf_continue.php(41): ezcWorkflowExecution->resume(Array) #1 {main} thrown in /usr/share/pear/ezc/Workflow/interfaces/execution.php on line 359 As much I understand in class ezcWorkflowConditionIsEqual extends ezcWorkflowConditionComparison method evaluate doesn't give a proper response. I checked: public function evaluate( $value ) { return $value == $this->value; } There is no value in $this->value Any hint? -- Tervitades, Margusja +3725148780 http://margusja.pri.ee skype: margusja msn: margu...@kodila.ee -- Components mailing list Components@lists.ez.no http://lists.ez.no/mailman/listinfo/components