public function getWorkflowDefinition($id)
	{
		if ( ! $this->isValidWorkflowId($id)) {
			throw new WorkflowException('Invalid workflow Id : '.VarDumper::dumpAsString($id));
		}

		if ( ! isset($this->_workflowDef[$id]) ) {

			if( $this->getDefinitionCache() != null ) {
				$cache = $this->getDefinitionCache();
				$key = $cache->buildKey('yii2-workflow-def-'.$id);
				if( $cache->exists($key) ) {
					$this->_workflowDef[$id] = $cache->get($key);
				} else {
					$this->_workflowDef[$id] = $this->getDefinitionLoader()->loadDefinition($id,$this);
					$cache->set($key, $this->_workflowDef[$id]);
				}
			} else {
				$this->_workflowDef[$id] = $this->getDefinitionLoader()->loadDefinition($id,$this);
			}
		}
		return $this->_workflowDef[$id];
	}
public function getWorkflowDefinition($id)
	{
		if ( ! $this->isValidWorkflowId($id)) {
			throw new WorkflowException('Invalid workflow Id : '.VarDumper::dumpAsString($id));
		}

		if ( ! isset($this->_workflowDef[$id]) ) {

			if( $this->getDefinitionCache() != null ) {
				$cache = $this->getDefinitionCache();
				$key = $cache->buildKey('yii2-workflow-def-'.$id);
				if( $cache->exists($key) ) {
					$this->_workflowDef[$id] = $cache->get($key);
				} else {
					$this->_workflowDef[$id] = $this->getDefinitionLoader()->loadDefinition($id,$this);
					$cache->set($key, $this->_workflowDef[$id]);
				}
			} else {
				$this->_workflowDef[$id] = $this->getDefinitionLoader()->loadDefinition($id,$this);
			}
		}
		return $this->_workflowDef[$id];
	}
public function getWorkflowDefinition ( $ id ) { if ( ! $ this -> isValidWorkflowId ( $ id ) ) { throw new WorkflowException ( 'Invalid workflow Id : ' . VarDumper :: dumpAsString ( $ id ) ) ; } if ( ! isset ( $ this -> _workflowDef [ $ id ] ) ) { if ( $ this -> getDefinitionCache ( ) != null ) { $ cache = $ this -> getDefinitionCache ( ) ; $ key = $ cache -> buildKey ( 'yii2-workflow-def-' . $ id ) ; if ( $ cache -> exists ( $ key ) ) { $ this -> _workflowDef [ $ id ] = $ cache -> get ( $ key ) ; } else { $ this -> _workflowDef [ $ id ] = $ this -> getDefinitionLoader ( ) -> loadDefinition ( $ id , $ this ) ; $ cache -> set ( $ key , $ this -> _workflowDef [ $ id ] ) ; } } else { $ this -> _workflowDef [ $ id ] = $ this -> getDefinitionLoader ( ) -> loadDefinition ( $ id , $ this ) ; } } return $ this -> _workflowDef [ $ id ] ; }
Loads definition for the workflow whose id is passed as argument.

The workflow Id passed as argument is used to create the class name of the object
that holds the workflow definition.

@param string $id
@throws \raoul2000\workflow\base\WorkflowException the definition could not be loaded
Loads definition for the workflow whose id is passed as argument .