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 '_'.
Inheritance: implements ezcWorkflowDefinitionStorage
Exemplo n.º 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));
         }
     }
 }
Exemplo n.º 2
0
Arquivo: set.php Projeto: 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));
     }
 }
Exemplo n.º 3
0
<?php

// Set up workflow definition storage (XML).
$definition = new ezcWorkflowDefinitionStorageXml('/path/to/directory');
// Save workflow definition to database.
$definition->save($workflow);
Exemplo n.º 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());
 }
Exemplo n.º 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');