Пример #1
0
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 */
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP') != 1) {
    G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
    G::header('location: ../login/login');
    die;
}
global $_DBArray;
G::LoadClass('tasks');
G::LoadClass('processMap');
$oTasks = new Tasks();
$aAux1 = $oTasks->getAllTasks($_GET['PRO_UID']);
$aTasks = array();
$aTasks[] = array('TAS_UID' => 'char', 'TAS_TITLE' => 'char');
//g::pr($aAux1);die;
foreach ($aAux1 as $aAux2) {
    if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') {
        $aTasks[] = array('TAS_UID' => $aAux2['TAS_UID'], 'TAS_TITLE' => $aAux2['TAS_TITLE']);
    }
}
$oProcessMap = new processMap(new DBConnection());
$aTriggersList = $oProcessMap->getTriggers($_GET['PRO_UID']);
$aTriggersFileds = array('TRI_UID' => 'char', 'TRI_TITLE' => 'char');
foreach ($aTriggersList as $i => $v) {
    unset($aTriggersList[$i]['PRO_UID']);
    unset($aTriggersList[$i]['TRI_DESCRIPTION']);
    $aTriggersList[$i]['TRI_TITLE'] = strlen($aTriggersList[$i]['TRI_TITLE']) > 32 ? substr($aTriggersList[$i]['TRI_TITLE'], 0, 32) . '...' : $aTriggersList[$i]['TRI_TITLE'];
Пример #2
0
    /**

     * Get Task Rows from a process and returns those in an array.

     *

     * @param $sProUid string for the process Uid

     * @return $oTask array

     */

    public function getTaskRows ($sProUid)

    {

        $oTask = new Tasks();

        return $oTask->getAllTasks( $sProUid );

    }
Пример #3
0
G::LoadClass('processMap');
global $_DBArray;
if (isset($_GET['EVN_UID'])) {
    require_once 'classes/model/Event.php';
    $oEvent = new Event();
    $aFields = $oEvent->load($_GET['EVN_UID']);
} else {
    $aFields = array('PRO_UID' => $_GET['PRO_UID']);
}
if (!isset($_SESSION['PROCESS'])) {
    if (isset($aFields['PRO_UID'])) {
        $_SESSION['PROCESS'] = $aFields['PRO_UID'];
    }
}
$oTasks = new Tasks();
$aAux1 = $oTasks->getAllTasks($aFields['PRO_UID']);
$aTasks = array();
$aTasks[] = array('TAS_UID' => 'char', 'TAS_TITLE' => 'char');
foreach ($aAux1 as $aAux2) {
    if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') {
        $aTasks[] = array('TAS_UID' => $aAux2['TAS_UID'], 'TAS_TITLE' => $aAux2['TAS_TITLE']);
    }
}
$oProcessMap = new processMap(new DBConnection());
$aTriggersList = $oProcessMap->getTriggers($_SESSION['PROCESS']);
$aTriggersFileds = array();
$aTriggersFileds[] = array('TRI_UID' => 'char', 'TRI_TITLE' => 'char');
foreach ($aTriggersList as $i => $v) {
    unset($aTriggersList[$i]['PRO_UID']);
    unset($aTriggersList[$i]['TRI_DESCRIPTION']);
    unset($aTriggersList[$i]['TRI_LOCATE_WEBBOT_PARAM']);
Пример #4
0
 /**
  * Get Process details
  *
  * @param object $httpData{PRO_UID}
  * @return array
  */
 public function getProcessDetail($httpData)
 {
     require_once 'classes/model/Process.php';
     G::loadClass('tasks');
     $tasks = new Tasks();
     $PRO_UID = $httpData->PRO_UID;
     $process = ProcessPeer::retrieveByPk($PRO_UID);
     $tasksList = $tasks->getAllTasks($PRO_UID);
     $rootNode->id = $process->getProUid();
     $rootNode->type = 'process';
     $rootNode->typeLabel = G::LoadTranslation('ID_PROCESS');
     $rootNode->text = $process->getProTitle();
     $rootNode->leaf = count($tasksList) > 0 ? false : true;
     $rootNode->iconCls = 'ss_sprite ss_application';
     $rootNode->expanded = true;
     foreach ($tasksList as $task) {
         $node = new stdClass();
         $node->id = $task['TAS_UID'];
         $node->type = 'task';
         $node->typeLabel = G::LoadTranslation('ID_TASK');
         $node->text = $task['TAS_TITLE'];
         $node->iconCls = 'ss_sprite ss_layout';
         $node->leaf = true;
         $rootNode->children[] = $node;
     }
     $treeDetail[] = $rootNode;
     return $treeDetail;
 }
Пример #5
0
$nodo_padre = addNodox($doc, '', 'Processes', '', array('xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xsi:noNamespaceSchemaLocation' => 'ColosaSchema.xsd'));
$aProcesses = array();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(ProcessPeer::PRO_UID);
//$oCriteria->add(ProcessPeer::PRO_STATUS, 'DISABLED', Criteria::NOT_EQUAL);
//$oCriteria->add(ProcessPeer::PRO_UID, '946679494980c3d0ba0814088444708');
$oDataset = ProcessPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$oProcess = new Process();
while ($aRow = $oDataset->getRow()) {
    $aProcess = $oProcess->load($aRow['PRO_UID']);
    $nodo_process = addNodox($doc, $nodo_padre, 'Process', '', array('Title' => $aProcess['PRO_TITLE'], 'Description' => $aProcess['PRO_DESCRIPTION']));
    $nodo_tasks = addNodox($doc, $nodo_process, 'Tasks', '', '');
    $oTask = new Tasks();
    $aTasks = $oTask->getAllTasks($aProcess['PRO_UID']);
    foreach ($aTasks as $key => $value) {
        //print_r($value); echo "<br>";
        $aRoute = $oTask->getRoute($aProcess['PRO_UID'], $value['TAS_UID']);
        //print_r($aRoute[0]['ROU_UID']); echo "<hr>";
        /*foreach($aRoute as $k => $v)
          echo $k."-->".$v."<br>";
          */
        if ($value['TAS_TYPE'] == 'NORMAL') {
            $ini = $value['TAS_START'] == 'TRUE' ? 'true' : 'false';
            $nodo_task = addNodox($doc, $nodo_tasks, 'Task', '', array('Title' => $value['TAS_TITLE'], 'Description' => $value['TAS_DESCRIPTION'], 'Id' => 'ID' . $value['TAS_UID'], 'StartingTask' => $ini));
            $nodo_coordinates = addNodox($doc, $nodo_task, 'Coordinates', '', array('XCoordinate' => $value['TAS_POSX'], 'YCoordinate' => $value['TAS_POSY']));
            $nodo_derivationrule = addNodox($doc, $nodo_task, 'DerivationRule', '', '');
            derivationRules($aRoute, $doc, $nodo_derivationrule);
            $nodo_assignmentrules = addNodox($doc, $nodo_task, 'AssignmentRules', '', '');
            $nodo_cyclicalassignment = addNodox($doc, $nodo_assignmentrules, 'CyclicalAssignment', '', '');