This workflow execution engine can only execute workflows that do not have any Input and/or SubWorkflow nodes.
Inheritance: extends ezcWorkflowExecution
Beispiel #1
0
 public function testNoExecutionIdResumeRaisesException()
 {
     $execution = new ezcWorkflowExecutionNonInteractive();
     try {
         $execution->resume();
     } catch (ezcWorkflowExecutionException $e) {
         $this->assertEquals('No execution id given.', $e->getMessage());
         return;
     }
     $this->fail('Expected an ezcWorkflowExecutionException to be thrown.');
 }
Beispiel #2
0
 /**
  * Returns a new execution object for a sub workflow.
  *
  * If this method is used to resume a subworkflow you must provide
  * the execution id through $id.
  *
  * If $interactive is false an ezcWorkflowExecutionNonInteractive
  * will be returned.
  *
  * This method can be used by nodes implementing sub-workflows
  * to get a new execution environment for the subworkflow.
  *
  * @param  int $id
  * @param  bool $interactive
  * @return ezcWorkflowExecution
  * @ignore
  */
 public function getSubExecution($id = null, $interactive = true)
 {
     if ($interactive) {
         $execution = $this->doGetSubExecution($id);
     } else {
         $execution = new ezcWorkflowExecutionNonInteractive();
     }
     foreach ($this->plugins as $plugin) {
         $execution->addPlugin($plugin);
     }
     return $execution;
 }
Beispiel #3
0
 /**
  * Returns a new execution object for a sub workflow.
  *
  * @param  int $id
  * @return ezcWorkflowExecution
  */
 protected function doGetSubExecution($id = NULL)
 {
     parent::doGetSubExecution($id);
     $execution = new ezcWorkflowTestExecution($id);
     foreach ($this->inputVariablesForSubWorkflow as $name => $value) {
         $execution->setInputVariable($name, $value);
     }
     if ($id !== NULL) {
         $execution->resume();
     }
     return $execution;
 }