The definitions are stored inside the directory specified to the constructor with the name: [workflowName]_[workflowVersion].xml where the name of the workflow has dots and spaces replaced by '_'.
상속: implements ezcWorkflowDefinitionStorage
예제 #1
0
 /**
  * Generate XML representation of this node's configuration.
  *
  * @param DOMElement $element
  * @ignore
  */
 public function configurationToXML(DOMElement $element)
 {
     $element->setAttribute('serviceObjectClass', $this->configuration['class']);
     if (!empty($this->configuration['arguments'])) {
         $xmlArguments = $element->appendChild($element->ownerDocument->createElement('arguments'));
         foreach ($this->configuration['arguments'] as $argument) {
             $xmlArguments->appendChild(ezcWorkflowDefinitionStorageXml::variableToXml($argument, $element->ownerDocument));
         }
     }
 }
예제 #2
0
파일: set.php 프로젝트: bmdevel/ezc
 /**
  * Generate XML representation of this node's configuration.
  *
  * @param DOMElement $element
  * @ignore
  */
 public function configurationToXML(DOMElement $element)
 {
     foreach ($this->configuration as $variable => $value) {
         $variableXml = $element->appendChild($element->ownerDocument->createElement('variable'));
         $variableXml->setAttribute('name', $variable);
         $variableXml->appendChild(ezcWorkflowDefinitionStorageXml::variableToXml($value, $element->ownerDocument));
     }
 }
예제 #3
0
<?php

// Set up workflow definition storage (XML).
$definition = new ezcWorkflowDefinitionStorageXml('/path/to/directory');
// Save workflow definition to database.
$definition->save($workflow);
예제 #4
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());
 }
예제 #5
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');