#014451: $workflow->nodes does not return all nodes

Description:

after modifying a workflow $workflow->nodes sometimes fails to return all nodes. in such a case
the number should be the same.

see code fragment

when you comment out the first two echo's then the code returns the correct result.
the call to $workflow->nodes makes it fail.

No resolution found


Environment:

Operating System:
PHP Version: (please be specific, like '4.4.3' or '5.1.5')
Database and version:
Browser (and version):


Steps to Reproduce:

  $w = new ezcWorkflow('test');
  
  $w->startNode->addOutNode($w->endNode);
  
  // If you remove this statement then the workflow counting works 
  echo "1count workflow:".count($w)."<br/>";
  echo "1count nodes:".count($w->nodes)."<br/>";
  
  $w->startNode->removeOutNode($w->endNode);
  
  // wait for input into the workflow variable value.
  $input = new ezcWorkflowNodeInput( array( 'value' => new ezcWorkflowConditionIsInteger() ) );
  $w->startNode->addOutNode( $input );
  
  // create the exclusive choice branching node
  $choice = new ezcWorkflowNodeExclusiveChoice;
  $input->addOutNode( $choice );
  
  $branch1 = new ezcWorkflowNodeInput( array( 'value' => new ezcWorkflowConditionIsAnything() ) ); // create nodes for the first branch of execution here..
  $branch2 = new ezcWorkflowNodeInput( array( 'value' => new ezcWorkflowConditionIsAnything() ) ); // create nodes for the second branch of execution here..
  
  // add the outnodes and set the conditions on the exclusive choice
  $choice->addConditionalOutNode( new ezcWorkflowConditionIsAnything() , $branch1 );
  $choice->addConditionalOutNode( new ezcWorkflowConditionIsAnything() , $branch2 );
  
  // Merge the two branches together and continue execution.
  $merge = new ezcWorkflowNodeSimpleMerge();
  $merge->addInNode( $branch1 );
  $merge->addInNode( $branch2 );
  $merge->addOutNode( $w->endNode );
  echo "2count workflow:".count($w)."<br/>";
  echo "2count nodes:".count($w->nodes)."<br/>";

OUTPUT:
1count workflow:2
1count nodes:2
2count workflow:7
2count nodes:6


- Attachments

No attachments for this issue.


- Comments

Please note that for some reason some of the comments in the code are deleted when posting the issue

#260207 by Sjoerd - on February 11th, 2009 [Permanent Link]

In the future, please attach code examples to the issue. Thanks!

#262840 by Sebastian Bergmann on August 29th, 2009 [Permanent Link]

I was able to reproduce this issue but have not found an elegant solution yet. As far as I can see, this issue has no real negative impact, at least not for the most common use cases of the component.

#261870 by Sebastian Bergmann on June 9th, 2009 [Permanent Link]

Fixed in r10843.

#262872 by Sebastian Bergmann on August 31st, 2009 [Permanent Link]

- History
Properties
Type Bug
Priority Medium
Component Components » Workflow
Affects Unknown
Fix Version 2009.2alpha1 - eZ components 2009.2alpha1
Reporter Sjoerd -
Responsible Sebastian Bergmann
Status 0 Closed
Resolution Fixed
Created February 11th, 2009
Updated August 31st, 2009
Resolved August 31st, 2009
 
Navigation [Permanent Link]
Previous Issue
Back to Issues List
Next Issue: #015537
  Graph shows to small and truncated rotated axis labels