Merged in cochalo/processmaker (pull request #464)

Adicion de flow entre gateway y un event
This commit is contained in:
Erik Amaru Ortiz
2014-05-07 09:37:24 -04:00

View File

@@ -416,10 +416,10 @@ class BpmnWorkflow extends Project\Bpmn
$gatewayFlow = $gatewayFlow->toArray(); $gatewayFlow = $gatewayFlow->toArray();
switch ($gatewayFlow['FLO_ELEMENT_DEST_TYPE']) { switch ($gatewayFlow['FLO_ELEMENT_DEST_TYPE']) {
case 'bpmnEvent':
case 'bpmnActivity': case 'bpmnActivity':
// (gateway -> activity) // (gateway -> activity)
$gateway = \BpmnGateway::findOneBy(\BpmnGatewayPeer::GAT_UID, $gatUid)->toArray(); $gateway = \BpmnGateway::findOneBy(\BpmnGatewayPeer::GAT_UID, $gatUid)->toArray();
switch ($gateway["GAT_TYPE"]) { switch ($gateway["GAT_TYPE"]) {
//case 'SELECTION': //case 'SELECTION':
case self::BPMN_GATEWAY_COMPLEX: case self::BPMN_GATEWAY_COMPLEX:
@@ -461,7 +461,11 @@ class BpmnWorkflow extends Project\Bpmn
} }
$condition = array_key_exists('FLO_CONDITION', $gatewayFlow) ? $gatewayFlow["FLO_CONDITION"] : ''; $condition = array_key_exists('FLO_CONDITION', $gatewayFlow) ? $gatewayFlow["FLO_CONDITION"] : '';
$this->wp->addRoute($activity["ACT_UID"], $gatewayFlow['FLO_ELEMENT_DEST'], $routeType, $condition); if ($gatewayFlow['FLO_ELEMENT_DEST_TYPE'] == 'bpmnEvent') {
$this->wp->addRoute($activity["ACT_UID"], -1, $routeType, $condition);
} else {
$this->wp->addRoute($activity["ACT_UID"], $gatewayFlow['FLO_ELEMENT_DEST'], $routeType, $condition);
}
break; break;
default: default:
// for processmaker is only allowed flows between "gateway -> activity" // for processmaker is only allowed flows between "gateway -> activity"