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:
@@ -195,8 +195,8 @@ class Workflow extends Handler
|
||||
{
|
||||
try {
|
||||
self::log("Remove Task: $tasUid");
|
||||
$task = new Task();
|
||||
$task->remove($tasUid);
|
||||
$task = new Tasks();
|
||||
$task->deleteTask($tasUid);
|
||||
self::log("Remove Task Success!");
|
||||
} catch (\Exception $e) {
|
||||
self::log("Exception: ", $e->getMessage(), "Trace: ", $e->getTraceAsString());
|
||||
@@ -275,18 +275,18 @@ class Workflow extends Handler
|
||||
}
|
||||
|
||||
if ($type != 'SEQUENTIAL' && $type != 'SEC-JOIN' && $type != 'DISCRIMINATOR') {
|
||||
if ($this->getNumberOfRoutes($this->proUid, $fromTasUid, $toTasUid, $type) > 0) {
|
||||
throw new \LogicException("Unexpected behaviour");
|
||||
}
|
||||
//if ($this->getNumberOfRoutes($this->proUid, $fromTasUid, $toTasUid, $type) > 0) {
|
||||
//throw new \LogicException("Unexpected behaviour");
|
||||
//}
|
||||
}
|
||||
|
||||
//if ($delete || $type == 'SEQUENTIAL' || $type == 'SEC-JOIN' || $type == 'DISCRIMINATOR') {
|
||||
$oTasks = new Tasks();
|
||||
$oTasks->deleteAllRoutesOfTask($this->proUid, $fromTasUid);
|
||||
//$oTasks = new Tasks();
|
||||
//$oTasks->deleteAllRoutesOfTask($this->proUid, $fromTasUid);
|
||||
//}
|
||||
|
||||
$result = $this->saveNewPattern($this->proUid, $fromTasUid, $toTasUid, $type, $delete);
|
||||
self::log("Add Route Success! -> ", $result);
|
||||
self::log("Add Route Success! - ROU_UID: ", $result);
|
||||
|
||||
return $result;
|
||||
} catch (\Exception $e) {
|
||||
@@ -295,6 +295,12 @@ class Workflow extends Handler
|
||||
}
|
||||
}
|
||||
|
||||
public function resetTaskRoutes($actUid)
|
||||
{
|
||||
$oTasks = new Tasks();
|
||||
$oTasks->deleteAllRoutesOfTask($this->proUid, $actUid);
|
||||
}
|
||||
|
||||
public function updateRoute($rouUid, $routeData)
|
||||
{
|
||||
$routeData['ROU_UID'] = $rouUid;
|
||||
|
||||
Reference in New Issue
Block a user