$variable2->setName('counter'); $partTitle = new Ezer_Variable(); $partTitle->setName('title'); $partTitle->setType('string'); $variable2->parts[] = $partTitle; $partCounts = new Ezer_Variable(); $partCounts->setName('counts'); $partCounts->setType('array'); $variable2->parts[] = $partCounts; $partArray = new Ezer_Variable(); $partCounts->parts[] = $partArray; $partStart = new Ezer_Variable(); $partStart->setName('start'); $partStart->setType('int'); $partArray->parts[] = $partStart; $partStop = new Ezer_Variable(); $partStop->setName('stop'); $partStop->setType('int'); $partArray->parts[] = $partStop; $process = new Ezer_PropelBusinessProcess(); $process->setName('Complex Async Set'); $process->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $process->addVariable($variable1); $process->addVariable($variable2); $process->save(); $sequence = new Ezer_PropelSequence(); $sequence->setName('main'); $sequence->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $sequence->setContainer($process); $sequence->save(); $activity = new Ezer_PropelActivityStep();
<?php error_reporting(E_ALL); require_once 'bootstrap.php'; $config = Ezer_Config::createFromPath('config.xml'); Propel::setConfiguration($config->database->toArray()); Propel::initialize(); // insert process $variable1 = new Ezer_Variable(); $variable1->setName('hello'); $variable1->setType('string'); $variable2 = new Ezer_Variable(); $variable2->setName('bye'); $variable2->setType('string'); $process = new Ezer_PropelBusinessProcess(); $process->setName('HelloWorld'); $process->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $process->addVariable($variable1); $process->addVariable($variable2); $process->save(); $sequence = new Ezer_PropelSequence(); $sequence->setName('main'); $sequence->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $sequence->setContainer($process); $sequence->save(); $activity = new Ezer_PropelActivityStep(); $activity->setName('Hello World'); $activity->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $activity->setClass('SayActivity'); $activity->setArgs(array('hello')); $activity->setContainer($sequence, 0);
public function __construct(DOMNode $element) { parent::__construct(uniqid('var_')); $this->parse($element); }
public function addVariable(Ezer_Variable $variable) { $this->variables[$variable->getName()] = $variable; }
Propel::setConfiguration($config->database->toArray()); Propel::initialize(); // insert process $variable1 = new Ezer_Variable(); $variable1->setName('condition'); $variable1->setType('int'); $variable2 = new Ezer_Variable(); $variable2->setName('expression'); $variable2->setType('boolean'); $variable3 = new Ezer_Variable(); $variable3->setName('beginMessage'); $variable3->setType('string'); $variable4 = new Ezer_Variable(); $variable4->setName('endMessage'); $variable4->setType('string'); $variable5 = new Ezer_Variable(); $variable5->setName('ifMessage'); $variable5->setType('string'); $process = new Ezer_PropelBusinessProcess(); $process->setName('If'); $process->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $process->addVariable($variable1); $process->addVariable($variable2); $process->addVariable($variable3); $process->addVariable($variable4); $process->addVariable($variable5); $process->save(); $sequence = new Ezer_PropelSequence(); $sequence->setName('main'); $sequence->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $sequence->setContainer($process);
Propel::setConfiguration($config->database->toArray()); Propel::initialize(); // insert process $variable1 = new Ezer_Variable(); $variable1->setName('count'); $variable2 = new Ezer_Variable(); $variable2->setName('left1'); $variable3 = new Ezer_Variable(); $variable3->setName('left2'); $variable4 = new Ezer_Variable(); $variable4->setName('right1'); $variable5 = new Ezer_Variable(); $variable5->setName('right2'); $variable6 = new Ezer_Variable(); $variable6->setName('before'); $variable7 = new Ezer_Variable(); $variable7->setName('after'); $process = new Ezer_PropelBusinessProcess(); $process->setName('Flow'); $process->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $process->addVariable($variable1); $process->addVariable($variable2); $process->addVariable($variable3); $process->addVariable($variable4); $process->addVariable($variable5); $process->addVariable($variable6); $process->addVariable($variable7); $process->save(); $sequence = new Ezer_PropelSequence(); $sequence->setName('main'); $sequence->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE);
$variable1 = new Ezer_Variable(); $variable1->setName('condition'); $variable1->setType('int'); $variable2 = new Ezer_Variable(); $variable2->setName('expression'); $variable2->setType('boolean'); $variable3 = new Ezer_Variable(); $variable3->setName('beginMessage'); $variable3->setType('string'); $variable4 = new Ezer_Variable(); $variable4->setName('endMessage'); $variable4->setType('string'); $variable5 = new Ezer_Variable(); $variable5->setName('ifMessage'); $variable5->setType('string'); $variable6 = new Ezer_Variable(); $variable6->setName('elseMessage'); $variable6->setType('string'); $process = new Ezer_PropelBusinessProcess(); $process->setName('If Else'); $process->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $process->addVariable($variable1); $process->addVariable($variable2); $process->addVariable($variable3); $process->addVariable($variable4); $process->addVariable($variable5); $process->addVariable($variable6); $process->save(); $sequence = new Ezer_PropelSequence(); $sequence->setName('main'); $sequence->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE);
<?php error_reporting(E_ALL); require_once 'bootstrap.php'; $config = Ezer_Config::createFromPath('config.xml'); Propel::setConfiguration($config->database->toArray()); Propel::initialize(); // insert process $variable1 = new Ezer_Variable(); $variable1->setName('message'); $variable1->setType('string'); $variable2 = new Ezer_Variable(); $variable2->setName('users'); $variable2->setType('array'); $process = new Ezer_PropelBusinessProcess(); $process->setName('Foreach Parallel'); $process->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $process->addVariable($variable1); $process->addVariable($variable2); $process->save(); $sequence = new Ezer_PropelSequence(); $sequence->setName('main'); $sequence->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $sequence->setContainer($process); $sequence->save(); $items = new Ezer_AssignStepFromAttribute('users'); $foreach = new Ezer_PropelForeach(); $foreach->setName('Foreach'); $foreach->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $foreach->setOrderType(Ezer_IntForeach::TYPE_PARALLEL); $foreach->setArg($items);
$variable1 = new Ezer_Variable(); $variable1->setName('title'); $variable1->setType('string'); $variable2 = new Ezer_Variable(); $variable2->setName('counter'); $partTitle = new Ezer_Variable(); $partTitle->setName('title'); $partTitle->setType('string'); $variable2->parts[] = $partTitle; $partCounts = new Ezer_Variable(); $partCounts->setName('counts'); $partCounts->setType('array'); $variable2->parts[] = $partCounts; $partArray = new Ezer_Variable(); $partCounts->parts[] = $partArray; $partStart = new Ezer_Variable(); $partStart->setName('start'); $partStart->setType('int'); $partArray->parts[] = $partStart; $partStop = new Ezer_Variable(); $partStop->setName('stop'); $partStop->setType('int'); $partArray->parts[] = $partStop; $process = new Ezer_PropelBusinessProcess(); $process->setName('Complex Count'); $process->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $process->addVariable($variable1); $process->addVariable($variable2); $process->save(); $sequence = new Ezer_PropelSequence(); $sequence->setName('main');
$variable3 = new Ezer_Variable(); $variable3->setName('beginMessage'); $variable3->setType('string'); $variable4 = new Ezer_Variable(); $variable4->setName('endMessage'); $variable4->setType('string'); $variable5 = new Ezer_Variable(); $variable5->setName('ifMessage'); $variable5->setType('string'); $variable6 = new Ezer_Variable(); $variable6->setName('elseMessage'); $variable6->setType('string'); $variable7 = new Ezer_Variable(); $variable7->setName('elseIfMessage1'); $variable6->setType('string'); $variable8 = new Ezer_Variable(); $variable8->setName('elseIfMessage2'); $variable8->setType('string'); $process = new Ezer_PropelBusinessProcess(); $process->setName('Else If'); $process->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE); $process->addVariable($variable1); $process->addVariable($variable2); $process->addVariable($variable3); $process->addVariable($variable4); $process->addVariable($variable5); $process->addVariable($variable6); $process->addVariable($variable7); $process->addVariable($variable8); $process->save(); $sequence = new Ezer_PropelSequence();