Adding Unit Tests to BpmnWorkflow Adapter
- Adding Activity->Gateway Flow handler - Adding Activity->Gateway ==> Route Listener to Adapter Now gateways with DIVERGING and CONVERGING directions are interpreted as its respective workflow route types.
This commit is contained in:
@@ -150,26 +150,26 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
|
||||
public function removeGateway($gatUid)
|
||||
{
|
||||
$gatewayData = $this->getGateway($gatUid);
|
||||
$flowsDest = \BpmnFlow::findAllBy(\BpmnFlowPeer::FLO_ELEMENT_DEST, $gatUid);
|
||||
// $gatewayData = $this->getGateway($gatUid);
|
||||
// $flowsDest = \BpmnFlow::findAllBy(\BpmnFlowPeer::FLO_ELEMENT_DEST, $gatUid);
|
||||
|
||||
foreach ($flowsDest as $flowDest) {
|
||||
switch ($flowDest->getFloElementOriginType()) {
|
||||
case "bpmnActivity":
|
||||
$actUid = $flowDest->getFloElementOrigin();
|
||||
$flowsOrigin = \BpmnFlow::findAllBy(\BpmnFlowPeer::FLO_ELEMENT_ORIGIN, $gatUid);
|
||||
|
||||
foreach ($flowsOrigin as $flowOrigin) {
|
||||
switch ($flowOrigin->getFloElementDestType()) {
|
||||
case "bpmnActivity":
|
||||
$toActUid = $flowOrigin->getFloElementDest();
|
||||
$this->wp->removeRouteFromTo($actUid, $toActUid);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// foreach ($flowsDest as $flowDest) {
|
||||
// switch ($flowDest->getFloElementOriginType()) {
|
||||
// case "bpmnActivity":
|
||||
// $actUid = $flowDest->getFloElementOrigin();
|
||||
// $flowsOrigin = \BpmnFlow::findAllBy(\BpmnFlowPeer::FLO_ELEMENT_ORIGIN, $gatUid);
|
||||
//
|
||||
// foreach ($flowsOrigin as $flowOrigin) {
|
||||
// switch ($flowOrigin->getFloElementDestType()) {
|
||||
// case "bpmnActivity":
|
||||
// $toActUid = $flowOrigin->getFloElementDest();
|
||||
// $this->wp->removeRouteFromTo($actUid, $toActUid);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
parent::removeGateway($gatUid);
|
||||
}
|
||||
@@ -298,6 +298,10 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE => "bpmnGateway"
|
||||
));
|
||||
|
||||
if ($gatewayFlows > 0) {
|
||||
$this->wp->resetTaskRoutes($activity["ACT_UID"]);
|
||||
}
|
||||
|
||||
foreach ($gatewayFlows as $gatewayFlow) {
|
||||
$gatewayFlow = $gatewayFlow->toArray();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user