loadByName() public method

When the $workflowVersion argument is omitted, the most recent version is loaded.
public loadByName ( string $workflowName, integer $workflowVersion ) : ezcWorkflow
$workflowName string
$workflowVersion integer
return ezcWorkflow
Ejemplo n.º 1
0
 public function testLoadWorkflowWithSubWorkflowAndVariablePassing()
 {
     $definition = new ezcWorkflowDefinitionStorageXml(dirname(dirname(dirname(__FILE__))) . '/Workflow/tests/data/');
     $workflow = $definition->loadByName('IncrementVariable');
     $this->definition->save($workflow);
     $this->setUpWorkflowWithSubWorkflowAndVariablePassing();
     $this->definition->save($this->workflow);
     $this->execution->workflow = $this->workflow;
     $this->execution->start();
     $this->assertEquals($this->readExpected('WorkflowWithSubWorkflowAndVariablePassing'), $this->readActual());
 }
Ejemplo n.º 2
0
<?php

// Set up workflow definition storage (XML).
$definition = new ezcWorkflowDefinitionStorageXml('/path/to/directory');
// Load latest version of workflow named "Test".
$workflow = $definition->loadByName('Test');