From 99e03ef44f1b69ed7412f15cf4e4f4b8d18b8a85 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 13 Feb 2015 01:55:46 +0100 Subject: [PATCH] BusinessProcess: tell about state type --- library/Businessprocess/BusinessProcess.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/library/Businessprocess/BusinessProcess.php b/library/Businessprocess/BusinessProcess.php index e755d7d..20b9d13 100644 --- a/library/Businessprocess/BusinessProcess.php +++ b/library/Businessprocess/BusinessProcess.php @@ -179,6 +179,16 @@ class BusinessProcess return $this; } + public function usesSoftStates() + { + return $this->state_type === self::SOFT_STATE; + } + + public function usesHardStates() + { + $this->state_type === self::HARD_STATE; + } + public function addRootNode($name) { $this->root_nodes[$name] = $this->getNode($name); @@ -304,6 +314,13 @@ class BusinessProcess return $node; } + public function createImportedNode($config, $name) + { + $node = new ImportedNode($this, (object) array('name' => $name, 'configName' => $config)); + $this->nodes[$name] = $node; + return $node; + } + public function getNode($name) { if (array_key_exists($name, $this->nodes)) {