Businessprocess\Controller: optional state types

Only set state type if given, default is set at process load time
This commit is contained in:
Thomas Gelf 2015-02-07 00:36:01 +01:00
parent f7ed590d87
commit c2e02796fa

View file

@ -63,14 +63,19 @@ class Controller extends ModuleActionController
$bp = $storage->loadProcess($process);
if ($this->_getParam('state_type') === 'soft'
|| (isset($bpconf->states) && $bpconf->states === 'soft')) {
$bp->useSoftStates();
if (null !== ($stateType = $this->params->get('state_type'))) {
if ($stateType === 'soft') {
$bp->useSoftStates();
}
if ($stateType === 'soft') {
$bp->useHardStates();
}
}
$bp->retrieveStatesFromBackend($this->backend);
return $bp;
}
protected function loadSlas()
{
$bpconf = $this->bpconf;