$value ) ); ?> Incoming nodes: 1 Outgoing nodes: 1
Inheritance: extends ezcWorkflowNode
Exemplo n.º 1
0
 protected function setUpWorkflowWithFinalActivitiesAfterCancellation()
 {
     $this->workflow = new ezcWorkflow('WorkflowWithFinalActivitiesAfterCancellation');
     $cancelNode = new ezcWorkflowNodeCancel();
     $this->workflow->startNode->addOutNode($cancelNode);
     $this->workflow->endNode->addInNode($cancelNode);
     $set = new ezcWorkflowNodeVariableSet(array('finalActivityExecuted' => true));
     $set->addOutNode(new ezcWorkflowNodeEnd());
     $this->workflow->finallyNode->addOutNode($set);
 }
Exemplo n.º 2
0
 public function testVerifyTooManyOutgoingNodes()
 {
     $a = new ezcWorkflowNodeVariableSet(array('foo' => 'bar'));
     $b = new ezcWorkflowNodeVariableSet(array('foo' => 'bar'));
     $c = new ezcWorkflowNodeVariableSet(array('foo' => 'bar'));
     $d = new ezcWorkflowNodeVariableSet(array('foo' => 'bar'));
     $b->addOutNode($c);
     $b->addOutNode($d);
     $b->addInNode($a);
     try {
         $b->verify();
     } catch (ezcWorkflowInvalidWorkflowException $e) {
         $this->assertEquals('Node of type "VariableSet" has more outgoing nodes than allowed.', $e->getMessage());
         return;
     }
     $this->fail('Expected an ezcWorkflowInvalidWorkflowException to be thrown.');
 }