Loading...
 
 Error
  • Contact the site administrator. The index needs rebuilding.
Galaxia Workflow Engine

Galaxia Workflow Engine


Re: joint activity not working

Brazil

Found the bug.
First, download and apply the patches in diffs.zip available here.
Then edit /lib/Galaxia/src/API/Instance.php and replace lines 572-580

Image
Copy to clipboard
// Test if the join activity has preceding activities that are not completed yet if ($type == 'join') { $querycant = "select count(*) from `" . GALAXIA_TABLE_PREFIX . "transitions` tr " . "INNER JOIN " . GALAXIA_TABLE_PREFIX . "instance_activities gia ON tr.actFromId=gia.activityId " . "where tr.pid=? and tr.actToId=? and gia.instanceId=? and gia.status = ?"; // if there are still preceding activities not completed, STOP if ($nb = $this->getone($querycant, array($this->pId, $activityId, $iid, 'running'))) { //echo 'Pending preceding activities = ' . $nb; return; } }


with

Image
Copy to clipboard
// Test if the join activity has preceding activities that are not completed yet if ($type == 'join') { $querycant = "SELECT (SELECT COUNT(*) FROM `" . GALAXIA_TABLE_PREFIX . "transitions` WHERE actToId = ?) - (SELECT COUNT(*) FROM `" . GALAXIA_TABLE_PREFIX . "transitions` tr " . "INNER JOIN " . GALAXIA_TABLE_PREFIX . "instance_activities gia ON tr.actFromId=gia.activityId " . "where tr.pid=? and tr.actToId=? and gia.instanceId=? and gia.status = ?) AS Pending"; // if there are still preceding activities not completed, STOP if ($nb = $this->getone($querycant, array($activityId, $this->pId, $activityId, $iid, 'completed'))) { //echo 'Pending preceding activities = ' . $nb; return; } }


Regards,

Georger

There are no comments at this time.