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 <?php
2 set_include_path(
"/var/www/arendus/mehis/big/library/ezcomponents/" . PATH_SEPARATOR .
get_include_path());
3 require_once "Base/src/base.php"; // dependent on installation
method, see below
4 function __autoload( $className ){
5 ezcBase::autoload( $className );
6 }
7
8 class age implements ezcWorkflowServiceObject{
9 public $points;
10 public $variableName;
11 public $inNode;
12 public $outNode;
13 public $choice;
14 public function __construct($points) {
15 $this->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 && <= 999999 )"] node9 -> node10 node10 -> node2 node11 ->
node10 node12 -> node10 node13 -> node10 node14 -> node10 node15 ->
node6 node16 -> node6 }
--
Regards Margusja
Phone: +372 51 48 780
MSN: [email protected]
skype: margusja
web: http://margusja.pri.ee
--
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components