BpNode: use modified loop detection everywhere

This commit is contained in:
Thomas Gelf 2016-11-29 11:22:44 +01:00
parent b954a67c79
commit 857913172b
2 changed files with 8 additions and 2 deletions

View file

@ -299,18 +299,23 @@ class BpNode extends Node
*/
public function reCalculateState()
{
$bp = $this->bp;
$sort_states = array();
$lastStateChange = 0;
if (!$this->hasChildren()) {
// TODO: delegate this to operators, should mostly fail
$this->state = 0;
$this->setMissing();
return $this;
}
foreach ($this->getChildren() as $child) {
$this->beginLoopDetection();
$bp->beginLoopDetection($this->name);
$sort_states[] = $child->getSortingState();
$lastStateChange = max($lastStateChange, $child->getLastStateChange());
$this->endLoopDetection();
$bp->endLoopDetection($this->name);
}
$this->setLastStateChange($lastStateChange);

View file

@ -112,6 +112,7 @@ class BusinessProcess
protected $simulationCount = 0;
/** @var ProcessChanges */
protected $appliedChanges;
public function __construct()