Exemplo n.º 1
0
 /**
  * @return bool|AbstractCondition
  */
 protected function getPreCondition()
 {
     if ($this->preCondition === null) {
         $this->preCondition = false;
         $conditionConfiguration = $this->processDefinition->getPreConditionsConfiguration();
         if ($conditionConfiguration) {
             $this->preCondition = $this->conditionFactory->create(ConfigurableCondition::ALIAS, $conditionConfiguration);
         }
     }
     return $this->preCondition;
 }
Exemplo n.º 2
0
 /**
  * @param ProcessDefinition $definition
  * @return ProcessDefinition
  */
 public function import(ProcessDefinition $definition)
 {
     // enabled flag should not be imported
     $this->setName($definition->getName())->setLabel($definition->getLabel())->setRelatedEntity($definition->getRelatedEntity())->setExecutionOrder($definition->getExecutionOrder())->setActionsConfiguration($definition->getActionsConfiguration())->setExcludeDefinitions($definition->getExcludeDefinitions())->setPreConditionsConfiguration($definition->getPreConditionsConfiguration());
     return $this;
 }