Esempio n. 1
0
    public function updateActivity($actUid, $data)
    {
        parent::updateActivity($actUid, $data);

        $taskData = array();

        if (array_key_exists("ACT_NAME", $data)) {
            $taskData["TAS_TITLE"] = $data["ACT_NAME"];
        }
        if (array_key_exists("ACT_NAME", $data)) {
            $taskData["TAS_POSX"] = $data["BOU_X"];
        }
        if (array_key_exists("ACT_NAME", $data)) {
            $taskData["TAS_POSY"] = $data["BOU_Y"];
        }

        $this->wp->updateTask($actUid, $taskData);
    }
Esempio n. 2
0
    public function updateActivity($actUid, $data)
    {
        //Update Activity
        $activityBefore = \BpmnActivityPeer::retrieveByPK($actUid);

        parent::updateActivity($actUid, $data);

        $activityCurrent = \BpmnActivityPeer::retrieveByPK($actUid);

        //Update Task
        $taskData = array();

        if (array_key_exists("ACT_NAME", $data)) {
            $taskData["TAS_TITLE"] = $data["ACT_NAME"];
        }
        if (array_key_exists("ACT_NAME", $data)) {
            $taskData["TAS_POSX"] = $data["BOU_X"];
        }
        if (array_key_exists("ACT_NAME", $data)) {
            $taskData["TAS_POSY"] = $data["BOU_Y"];
        }

        if ($activityBefore->getActTaskType() != "SCRIPTTASK" && $activityCurrent->getActTaskType() == "SCRIPTTASK") {
            $taskData["TAS_TYPE"] = "SCRIPT-TASK";
            $taskData["TAS_ASSIGN_TYPE"] = "BALANCED";
        }

        if ($activityBefore->getActTaskType() == "SCRIPTTASK" && $activityCurrent->getActTaskType() != "SCRIPTTASK") {
            $taskData["TAS_TYPE"] = "NORMAL";
            $taskData["TAS_ASSIGN_TYPE"] = "BALANCED";

            $scriptTask = new \ProcessMaker\BusinessModel\ScriptTask();

            $scriptTask->deleteWhere(array(
                \ScriptTaskPeer::PRJ_UID => $activityCurrent->getPrjUid(),
                \ScriptTaskPeer::ACT_UID => $activityCurrent->getActUid()
            ));
        }

        $this->wp->updateTask($actUid, $taskData);
    }
Esempio n. 3
0
 public function updateActivity($actUid, $data)
 {
     //Update Activity
     $activityBefore = \BpmnActivityPeer::retrieveByPK($actUid);
     parent::updateActivity($actUid, $data);
     $activityCurrent = \BpmnActivityPeer::retrieveByPK($actUid);
     //Update Task
     $taskData = array();
     if (array_key_exists("ACT_NAME", $data)) {
         $taskData["TAS_TITLE"] = $data["ACT_NAME"];
     }
     if (array_key_exists("ACT_NAME", $data)) {
         $taskData["TAS_POSX"] = $data["BOU_X"];
     }
     if (array_key_exists("ACT_NAME", $data)) {
         $taskData["TAS_POSY"] = $data["BOU_Y"];
     }
     if ($activityBefore->getActTaskType() != "SCRIPTTASK" && $activityCurrent->getActTaskType() == "SCRIPTTASK") {
         $taskData["TAS_TYPE"] = "SCRIPT-TASK";
         $taskData["TAS_ASSIGN_TYPE"] = "BALANCED";
     }
     if ($activityBefore->getActTaskType() == "SCRIPTTASK" && $activityCurrent->getActTaskType() != "SCRIPTTASK") {
         $taskData["TAS_TYPE"] = "NORMAL";
         $taskData["TAS_ASSIGN_TYPE"] = "BALANCED";
         $scriptTask = new \ProcessMaker\BusinessModel\ScriptTask();
         $scriptTask->deleteWhere(array(\ScriptTaskPeer::PRJ_UID => $activityCurrent->getPrjUid(), \ScriptTaskPeer::ACT_UID => $activityCurrent->getActUid()));
     }
     if ($activityCurrent->getActLoopType() == "PARALLEL") {
         $task = \TaskPeer::retrieveByPK($actUid);
         if ($task->getTasAssignType() == "BALANCED" || $task->getTasAssignType() == "MANUAL" || $task->getTasAssignType() == "EVALUATE" || $task->getTasAssignType() == "REPORT_TO" || $task->getTasAssignType() == "SELF_SERVICE") {
             $taskData["TAS_ASSIGN_TYPE"] = "MULTIPLE_INSTANCE";
         }
     }
     if ($activityCurrent->getActLoopType() == "EMPTY") {
         $task = \TaskPeer::retrieveByPK($actUid);
         if ($task->getTasAssignType() == "MULTIPLE_INSTANCE_VALUE_BASED" || $task->getTasAssignType() == "MULTIPLE_INSTANCE") {
             $taskData["TAS_ASSIGN_TYPE"] = "BALANCED";
         }
     }
     $this->wp->updateTask($actUid, $taskData);
 }