本文整理汇总了PHP中Tasks::getUsersOfTask方法的典型用法代码示例。如果您正苦于以下问题:PHP Tasks::getUsersOfTask方法的具体用法?PHP Tasks::getUsersOfTask怎么用?PHP Tasks::getUsersOfTask使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tasks
的用法示例。
在下文中一共展示了Tasks::getUsersOfTask方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: adhocAssignUsersk
function adhocAssignUsersk($params)
{
G::LoadClass('groups');
G::LoadClass('tasks');
$oTasks = new Tasks();
$aAux = $oTasks->getGroupsOfTask($_SESSION['TASK'], 2);
$aAdhocUsers = array();
$oGroups = new Groups();
foreach ($aAux as $aGroup) {
$aUsers = $oGroups->getUsersOfGroup($aGroup['GRP_UID']);
foreach ($aUsers as $aUser) {
if ($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
$aAdhocUsers[] = $aUser['USR_UID'];
}
}
}
$aAux = $oTasks->getUsersOfTask($_SESSION['TASK'], 2);
foreach ($aAux as $aUser) {
if ($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
$aAdhocUsers[] = $aUser['USR_UID'];
}
}
require_once 'classes/model/Users.php';
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$oCriteria->add(UsersPeer::USR_UID, $aAdhocUsers, Criteria::IN);
$oDataset = UsersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$aData = array();
while ($oDataset->next()) {
$aData[] = $oDataset->getRow();
}
$this->data = $aData;
}
示例2: getTaskAssignees
/**
* Return an assignee list of an activity
*
* @param string $processUid
* @param string $taskUid
* @param string $option
* @param int $taskUserType
* @param array $arrayFilterData
* @param int $start
* @param int $limit
* @param string $type
*
* return array
*/
public function getTaskAssignees($processUid, $taskUid, $option, $taskUserType, $arrayFilterData = null, $start = null, $limit = null, $type = null)
{
try {
$arrayAssignee = array();
$numRecTotal = 0;
$startbk = $start;
$limitbk = $limit;
//Verify data
$process = new \ProcessMaker\BusinessModel\Process();
$process->throwExceptionIfDataNotMetPagerVarDefinition(array("start" => $start, "limit" => $limit), array("start" => "start", "limit" => "limit"));
$arrayFieldDefinition = array("OPTION" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array("ASSIGNEE", "AVAILABLE"), "fieldNameAux" => "option"), "TASK_USER_TYPE" => array("type" => "int", "required" => true, "empty" => false, "defaultValues" => array(1, 2), "fieldNameAux" => "taskUserType"));
$process->throwExceptionIfDataNotMetFieldDefinition(array("OPTION" => $option, "TASK_USER_TYPE" => $taskUserType), $arrayFieldDefinition, array("option" => "option", "taskUserType" => "taskUserType"), false);
//Set variables
$filterName = "filter";
if (!is_null($arrayFilterData) && is_array($arrayFilterData) && isset($arrayFilterData["filter"])) {
$arrayAux = array("" => "filter", "LEFT" => "lfilter", "RIGHT" => "rfilter");
$filterName = $arrayAux[isset($arrayFilterData["filterOption"]) ? $arrayFilterData["filterOption"] : ""];
}
//Get data
if (!is_null($limit) && $limit . "" == "0") {
//Return
return array("total" => $numRecTotal, "start" => (int) (!is_null($startbk) ? $startbk : 0), "limit" => (int) (!is_null($limitbk) ? $limitbk : 0), $filterName => !is_null($arrayFilterData) && is_array($arrayFilterData) && isset($arrayFilterData["filter"]) ? $arrayFilterData["filter"] : "", "data" => $arrayAssignee);
}
//Verify data
$process->throwExceptionIfNotExistsProcess($processUid, "prj_uid");
$this->throwExceptionIfNotExistsTask($processUid, $taskUid, "act_uid");
//Set variables
$numRecTotalGroup = 0;
$numRecTotalUser = 0;
switch ($option) {
case "ASSIGNEE":
break;
case "AVAILABLE":
$task = new \Tasks();
$arrayGroupUid = array();
foreach ($task->getGroupsOfTask($taskUid, $taskUserType) as $value) {
$arrayGroupUid[] = $value['GRP_UID'];
}
$arrayUserUid = array();
foreach ($task->getUsersOfTask($taskUid, $taskUserType) as $value) {
$arrayUserUid[] = $value['USR_UID'];
}
break;
}
//Groups
//Query
if (empty($type) || $type == "group") {
$criteriaGroup = new \Criteria("workflow");
$criteriaGroup->addSelectColumn(\GroupwfPeer::GRP_UID);
$criteriaGroup->addAsColumn("GRP_TITLE", \ContentPeer::CON_VALUE);
switch ($option) {
case "ASSIGNEE":
$criteriaGroup->addJoin(\TaskUserPeer::USR_UID, \GroupwfPeer::GRP_UID, \Criteria::LEFT_JOIN);
$criteriaGroup->add(\TaskUserPeer::TAS_UID, $taskUid, \Criteria::EQUAL);
$criteriaGroup->add(\TaskUserPeer::TU_TYPE, $taskUserType, \Criteria::EQUAL);
$criteriaGroup->add(\TaskUserPeer::TU_RELATION, 2, \Criteria::EQUAL);
break;
case "AVAILABLE":
$criteriaGroup->add(\GroupwfPeer::GRP_UID, $arrayGroupUid, \Criteria::NOT_IN);
break;
}
$criteriaGroup->addJoin(\GroupwfPeer::GRP_UID, \ContentPeer::CON_ID, \Criteria::LEFT_JOIN);
$criteriaGroup->add(\ContentPeer::CON_CATEGORY, "GRP_TITLE", \Criteria::EQUAL);
$criteriaGroup->add(\ContentPeer::CON_LANG, SYS_LANG, \Criteria::EQUAL);
if (!is_null($arrayFilterData) && is_array($arrayFilterData) && isset($arrayFilterData["filter"]) && trim($arrayFilterData["filter"]) != "") {
$arraySearch = array("" => "%" . $arrayFilterData["filter"] . "%", "LEFT" => $arrayFilterData["filter"] . "%", "RIGHT" => "%" . $arrayFilterData["filter"]);
$search = $arraySearch[isset($arrayFilterData["filterOption"]) ? $arrayFilterData["filterOption"] : ""];
$criteriaGroup->add(\ContentPeer::CON_VALUE, $search, \Criteria::LIKE);
}
$criteriaGroup->add(\GroupwfPeer::GRP_STATUS, "ACTIVE", \Criteria::EQUAL);
//Number records total
$criteriaCount = clone $criteriaGroup;
$criteriaCount->clearSelectColumns();
$criteriaCount->addSelectColumn("COUNT(" . \GroupwfPeer::GRP_UID . ") AS NUM_REC");
switch ($option) {
case "ASSIGNEE":
$rsCriteriaCount = \TaskUserPeer::doSelectRS($criteriaCount);
break;
case "AVAILABLE":
$rsCriteriaCount = \GroupwfPeer::doSelectRS($criteriaCount);
break;
}
$rsCriteriaCount->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$result = $rsCriteriaCount->next();
$row = $rsCriteriaCount->getRow();
$numRecTotalGroup = (int) $row["NUM_REC"];
//.........这里部分代码省略.........
示例3: array
$aCasesList = array();
foreach ($APP_UIDS as $APP_UID) {
$aCase = $oCases->loadCaseInCurrentDelegation($APP_UID, true);
$aUsersInvolved = array();
$aCaseGroups = $oTasks->getGroupsOfTask($aCase['TAS_UID'], 1);
foreach ($aCaseGroups as $aCaseGroup) {
$aCaseUsers = $oGroups->getUsersOfGroup($aCaseGroup['GRP_UID']);
foreach ($aCaseUsers as $aCaseUser) {
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
$aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
$aUsersInvolved[$aCaseUser['USR_UID']] = $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME'];
// . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
}
}
}
$aCaseUsers = $oTasks->getUsersOfTask($aCase['TAS_UID'], 1);
foreach ($aCaseUsers as $aCaseUser) {
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
$aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
$aUsersInvolved[$aCaseUser['USR_UID']] = $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME'];
// . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
}
}
$oTmp = new stdClass();
$oTmp->items = $aUsersInvolved;
$oTmp->id = $aCase['APP_UID'];
$aCase['USERS'] = $oTmp;
array_push($aCasesList, $aCase);
}
$filedNames = array("APP_UID", "APP_NUMBER", "APP_UPDATE_DATE", "DEL_PRIORITY", "DEL_INDEX", "TAS_UID", "DEL_INIT_DATE", "DEL_FINISH_DATE", "USR_UID", "APP_STATUS", "DEL_TASK_DUE_DATE", "APP_CURRENT_USER", "APP_TITLE", "APP_PRO_TITLE", "APP_TAS_TITLE", "APP_DEL_PREVIOUS_USER", "USERS");
$aCasesList = array_merge(array($filedNames), $aCasesList);
示例4: getUsersToReassign
public function getUsersToReassign($TAS_UID, $USR_UID, $PRO_UID=null)
{
G::LoadClass('groups');
G::LoadClass('tasks');
$oTasks = new Tasks();
$aAux = $oTasks->getGroupsOfTask($TAS_UID, 1);
$row = array();
$groups = new Groups();
foreach ($aAux as $aGroup) {
$aUsers = $groups->getUsersOfGroup($aGroup['GRP_UID']);
foreach ($aUsers as $aUser) {
if ($aUser['USR_UID'] != $USR_UID) {
$row[] = $aUser['USR_UID'];
}
}
}
$aAux = $oTasks->getUsersOfTask($TAS_UID, 1);
foreach ($aAux as $aUser) {
if ($aUser['USR_UID'] != $USR_UID) {
$row[] = $aUser['USR_UID'];
}
}
// Group Ad Hoc
$oTasks = new Tasks();
$aAux = $oTasks->getGroupsOfTask($TAS_UID, 2);
$groups = new Groups();
foreach ($aAux as $aGroup) {
$aUsers = $groups->getUsersOfGroup($aGroup['GRP_UID']);
foreach ($aUsers as $aUser) {
if ($aUser['USR_UID'] != $USR_UID) {
$row[] = $aUser['USR_UID'];
}
}
}
// User Ad Hoc
$aAux = $oTasks->getUsersOfTask($TAS_UID, 2);
foreach ($aAux as $aUser) {
if ($aUser['USR_UID'] != $USR_UID) {
$row[] = $aUser['USR_UID'];
}
}
global $RBAC;
//Adding the actual user if this has the PM_SUPERVISOR permission assigned.
if ($RBAC->userCanAccess('PM_SUPERVISOR') == 1) {
if(!in_array($RBAC->aUserInfo['USER_INFO']['USR_UID'], $row)) {
//.........这里部分代码省略.........
示例5: routeCaseNotification
/**
* Send Message each user id
*
* @param array $request_data
* @author Ronald Quenta <ronald.quenta@processmaker.com>
*
*/
public function routeCaseNotification($currentUserId, $processId, $currentTaskId, $appFields, $aTasks, $nextIndex)
{
try {
$oUser = new \Users();
$aUser = $oUser->load( $currentUserId );
$response = array();
$task = new \Tasks();
$group = new \Groups();
foreach ($aTasks as $aTask) {
$arrayTaskUser = array();
switch ($aTask["TAS_ASSIGN_TYPE"]) {
case "SELF_SERVICE":
if (isset($aTask["TAS_UID"]) && !empty($aTask["TAS_UID"])) {
$arrayAux1 = $task->getGroupsOfTask($aTask["TAS_UID"], 1);
foreach ($arrayAux1 as $arrayGroup) {
$arrayAux2 = $group->getUsersOfGroup($arrayGroup["GRP_UID"]);
foreach ($arrayAux2 as $arrayUser) {
$arrayTaskUser[] = $arrayUser["USR_UID"];
}
}
$arrayAux1 = $task->getUsersOfTask($aTask["TAS_UID"], 1);
foreach ($arrayAux1 as $arrayUser) {
$arrayTaskUser[] = $arrayUser["USR_UID"];
}
}
break;
default:
if (isset($aTask["USR_UID"]) && !empty($aTask["USR_UID"])) {
$arrayTaskUser = $aTask["USR_UID"];
}
break;
}
// $oTask = new \Task();
// $currentTask = $oTask->load($aTask['TAS_UID']);
$delIndex = null;
foreach ($nextIndex as $nIndex) {
if($aTask['TAS_UID'] == $nIndex['TAS_UID']){
$delIndex = $nIndex['DEL_INDEX'];
break;
}
}
$userIds = $arrayTaskUser;
$message = '#'. $appFields['APP_NUMBER'] . ' : '.$appFields['APP_TITLE'];
$data = array(
'processId' => $processId,
'taskId' => $aTask["TAS_UID"],
'caseId' => $appFields['APP_UID'],
'caseTitle' => $appFields['APP_TITLE'],
'delIndex' => $delIndex,
'typeList' => 'todo'
);
if ($userIds) {
$oNoti = new \NotificationDevice();
$devices = array();
if (is_array($userIds)){
foreach ($userIds as $id) {
$deviceUser = $oNoti->loadByUsersId($id);
$devices = array_merge($devices, $deviceUser);
}
} else {
$devices = $oNoti->loadByUsersId($userIds);
$lists = new \ProcessMaker\BusinessModel\Lists();
$counter = $lists->getCounters($userIds);
$light = new \ProcessMaker\Services\Api\Light();
$result = $light->parserCountersCases($counter);
$data['counters'] = $result;
}
$devicesAndroidIds = array();
$devicesAppleIds = array();
foreach ($devices as $dev) {
switch ($dev['DEV_TYPE']) {
case "apple":
$devicesAppleIds[] = $dev['DEV_REG_ID'];
break;
case "android":
$devicesAndroidIds[] = $dev['DEV_REG_ID'];
break;
}
}
if (count($devicesAppleIds) > 0) {
$oNotification = new PushMessageIOS();
$oNotification->setSettingNotification();
$oNotification->setDevices($devicesAppleIds);
$response['apple'] = $oNotification->send($message, $data);
}
if (count($devicesAndroidIds) > 0) {
//.........这里部分代码省略.........
示例6: getExtAvailableUsersList
public function getExtAvailableUsersList($sTaskUID = '', $iType = 2)
{
try {
$oTasks = new Tasks();
$aAux = $oTasks->getGroupsOfTask($sTaskUID, $iType);
$aUIDS1 = array();
$aUIDS2 = array();
foreach ($aAux as $aGroup) {
$aUIDS1[] = $aGroup['GRP_UID'];
}
$aAux = $oTasks->getUsersOfTask($sTaskUID, $iType);
foreach ($aAux as $aUser) {
$aUIDS2[] = $aUser['USR_UID'];
}
$aUsers = array();
$aUsers[] = array('LABEL' => 'char', 'TAS_UID' => 'char', 'USR_UID' => 'char', 'TU_TYPE' => 'integer', 'TU_RELATION' => 'integer');
$sDelimiter = DBAdapter::getStringDelimiter();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(GroupwfPeer::GRP_UID);
$oCriteria->addAsColumn('GRP_TITLE', 'C.CON_VALUE');
$oCriteria->addAlias('C', 'CONTENT');
$aConditions = array();
$aConditions[] = array(GroupwfPeer::GRP_UID, 'C.CON_ID');
$aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'GRP_TITLE' . $sDelimiter);
$aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(GroupwfPeer::GRP_STATUS, 'ACTIVE');
$oCriteria->add(GroupwfPeer::GRP_UID, $aUIDS1, Criteria::NOT_IN);
//$oCriteria->add(GroupwfPeer::GRP_UID, '', Criteria::NOT_EQUAL);
$oDataset = GroupwfPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$c = 0;
while ($aRow = $oDataset->getRow()) {
$c++;
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn('COUNT(*) AS MEMBERS_NUMBER');
$oCriteria->add(GroupUserPeer::GRP_UID, $aRow['GRP_UID']);
$oDataset2 = GroupUserPeer::doSelectRS($oCriteria);
$oDataset2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset2->next();
$aRow2 = $oDataset2->getRow();
$aUsers[] = array('LABEL' => $aRow['GRP_TITLE'] . ' <a href="#" onclick="usersGroup(\'' . $aRow['GRP_UID'] . '\', \'' . $c . '\');return false;"><font color="green"><strong>(' . $aRow2['MEMBERS_NUMBER'] . ' ' . ((int) $aRow2['MEMBERS_NUMBER'] == 1 ? G::LoadTranslation('ID_USER') : G::LoadTranslation('ID_USERS')) . ')</strong></font></a> <br /><div id="users' . $c . '" style="display: none"></div>', 'TAS_UID' => $sTaskUID, 'USR_UID' => $aRow['GRP_UID'], 'TU_TYPE' => $iType, 'TU_RELATION' => 2);
$oDataset->next();
}
$sDelimiter = DBAdapter::getStringDelimiter();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
$oCriteria->add(UsersPeer::USR_STATUS, 'ACTIVE');
$oCriteria->add(UsersPeer::USR_UID, $aUIDS2, Criteria::NOT_IN);
$oDataset = UsersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$aUsers[] = array('LABEL' => $aRow['USR_FIRSTNAME'] . ' ' . $aRow['USR_LASTNAME'], 'TAS_UID' => $sTaskUID, 'USR_UID' => $aRow['USR_UID'], 'TU_TYPE' => $iType, 'TU_RELATION' => 1);
$oDataset->next();
}
global $_DBArray;
$_DBArray = isset($_SESSION['_DBArray']) ? $_SESSION['_DBArray'] : '';
$_DBArray['availableUsers'] = $aUsers;
$_SESSION['_DBArray'] = $_DBArray;
return $_SESSION['_DBArray']['availableUsers'];
} catch (Exception $oError) {
throw $oError;
}
}
示例7: getUsersToReassign
public function getUsersToReassign($TAS_UID, $USR_UID)
{
G::LoadClass('groups');
G::LoadClass('tasks');
$oTasks = new Tasks();
$aAux = $oTasks->getGroupsOfTask($TAS_UID, 1);
$row = array();
$groups = new Groups();
foreach ($aAux as $aGroup) {
$aUsers = $groups->getUsersOfGroup($aGroup['GRP_UID']);
foreach ($aUsers as $aUser) {
if ($aUser['USR_UID'] != $USR_UID) {
$row[] = $aUser['USR_UID'];
}
}
}
$aAux = $oTasks->getUsersOfTask($TAS_UID, 1);
foreach ($aAux as $aUser) {
if ($aUser['USR_UID'] != $USR_UID) {
$row[] = $aUser['USR_UID'];
}
}
$aAux = $oTasks->getUsersOfTask($TAS_UID, 2);
foreach ($aAux as $aUser) {
if ($aUser['USR_UID'] != $USR_UID) {
$row[] = $aUser['USR_UID'];
}
}
require_once 'classes/model/Users.php';
$c = new Criteria('workflow');
$c->addSelectColumn(UsersPeer::USR_UID);
$c->addSelectColumn(UsersPeer::USR_USERNAME);
$c->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$c->addSelectColumn(UsersPeer::USR_LASTNAME);
$c->add(UsersPeer::USR_UID, $row, Criteria::IN);
$rs = UsersPeer::doSelectRs($c);
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rows = array();
while ($rs->next()) {
$rows[] = $rs->getRow();
}
return $rows;
}
示例8: array
}
$aUsers = array($_GET['USR_UID']);
$aAux1 = $oTasks->getGroupsOfTask($aRow['TAS_UID'], 1);
foreach ($aAux1 as $aGroup) {
$aAux2 = $oGroups->getUsersOfGroup($aGroup['GRP_UID']);
foreach ($aAux2 as $aUser) {
if (!in_array($aUser['USR_UID'], $aUsers)) {
$aUsers[] = $aUser['USR_UID'];
$aData = $oUser->load($aUser['USR_UID']);
$oTemplatePower->newBlock('users');
$oTemplatePower->assign('USR_UID', $aUser['USR_UID']);
$oTemplatePower->assign('USR_FULLNAME', $aData['USR_FIRSTNAME'] . ' ' . $aData['USR_LASTNAME'] . ' (' . $aData['USR_USERNAME'] . ')');
}
}
}
$aAux1 = $oTasks->getUsersOfTask($aRow['TAS_UID'], 1);
foreach ($aAux1 as $aUser) {
if (!in_array($aUser['USR_UID'], $aUsers)) {
$aUsers[] = $aUser['USR_UID'];
$aData = $oUser->load($aUser['USR_UID']);
$oTemplatePower->newBlock('users');
$oTemplatePower->assign('USR_UID', $aUser['USR_UID']);
$oTemplatePower->assign('USR_FULLNAME', $aData['USR_FIRSTNAME'] . ' ' . $aData['USR_LASTNAME'] . ' (' . $aData['USR_USERNAME'] . ')');
}
}
$oTemplatePower->gotoBlock('cases');
$oTemplatePower->assign('ID_STATUS', G::LoadTranslation('ID_TO_DO'));
$oTemplatePower->assign('ID_NO_REASSIGN', G::LoadTranslation('ID_NO_REASSIGN'));
$oDataset->next();
}
$oDataset = ApplicationPeer::doSelectRS($oCriteriaDraft);
示例9: getTaskAvailableAdhocAssignee
/**
* Return the available adhoc users and users groups to assigned to an activity
*
* @param string $sProcessUID {@min 32} {@max 32}
* @param string $sTaskUID {@min 32} {@max 32}
* @param string $filter
* @param int $start
* @param int $limit
* @param string $type
*
* return array
*
* @access public
*/
public function getTaskAvailableAdhocAssignee($sProcessUID, $sTaskUID, $filter, $start, $limit, $type)
{
try {
require_once (PATH_RBAC_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "RbacUsers.php");
require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "TaskUser.php");
require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "GroupUser.php");
Validator::proUid($sProcessUID, '$prj_uid');
$this->validateActUid($sTaskUID);
$iType = 2;
$oTasks = new \Tasks();
$aAux = $oTasks->getGroupsOfTask($sTaskUID, $iType);
$aUIDS1 = array();
$aUIDS2 = array();
foreach ($aAux as $aGroup) {
$aUIDS1[] = $aGroup['GRP_UID'];
}
$aAux = $oTasks->getUsersOfTask($sTaskUID, $iType);
foreach ($aAux as $aUser) {
$aUIDS2[] = $aUser['USR_UID'];
}
$aUsers = array();
$c = 0;
$oTasks = new \Tasks();
$aAux = $oTasks->getGroupsOfTask($sTaskUID, 2);
$aUIDS1 = array();
foreach ($aAux as $aGroup) {
$aUIDS1[] = $aGroup['GRP_UID'];
}
$criteria = new \Criteria( 'workflow' );
$criteria->addSelectColumn( \GroupwfPeer::GRP_UID );
$criteria->addSelectColumn( \GroupwfPeer::GRP_STATUS );
$criteria->addSelectColumn( \GroupwfPeer::GRP_UX );
$criteria->add(\GroupwfPeer::GRP_STATUS, "ACTIVE", \Criteria::EQUAL);
$criteria->addAsColumn( 'GRP_TITLE', \ContentPeer::CON_VALUE );
$criteria->addJoin( \GroupwfPeer::GRP_UID, \ContentPeer::CON_ID, \Criteria::LEFT_JOIN );
$criteria->add( \ContentPeer::CON_CATEGORY, 'GRP_TITLE' );
//.........这里部分代码省略.........
示例10: Configurations
$aCaseGroups = $oTasks->getGroupsOfTask($TaskUid, 1);
$oConf = new Configurations();
$ConfEnv = $oConf->getFormats();
foreach ($aCaseGroups as $aCaseGroup) {
$aCaseUsers = $oGroups->getUsersOfGroup($aCaseGroup['GRP_UID']);
foreach ($aCaseUsers as $aCaseUser) {
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
$aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
$sCaseUser = G::getFormatUserList($ConfEnv['format'], $aCaseUserRecord);
// $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
$aUsersInvolved[] = array('userUid' => $aCaseUser['USR_UID'], 'userFullname' => $sCaseUser);
// . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
}
}
}
$aCaseUsers = $oTasks->getUsersOfTask($TaskUid, 1);
foreach ($aCaseUsers as $aCaseUser) {
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
$aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
$sCaseUser = G::getFormatUserList($ConfEnv['format'], $aCaseUserRecord);
// $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
$aUsersInvolved[] = array('userUid' => $aCaseUser['USR_UID'], 'userFullname' => $sCaseUser);
// . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
}
}
// $oTmp = new stdClass();
// $oTmp->items = $aUsersInvolved;
$result = array();
$aUsersInvolved = array_sort($aUsersInvolved, 'userFullname', SORT_ASC, $query);
$result['data'] = $aUsersInvolved;
print G::json_encode($result);
示例11: array
$aUsrUid = array();
$aAux1 = $oTasks->getGroupsOfTask($aRow['TAS_UID'], 1);
foreach ($aAux1 as $value1) {
$aAux2 = $oGroups->getUsersOfGroup($value1['GRP_UID']);
foreach ($aAux2 as $value2) {
if ($aRow['USR_UID'] != $value2['USR_UID']) {
if (!in_array($value2['USR_UID'], $aUsrUid)) {
//var_dump($aRow['USR_UID'], $value2['USR_UID']);echo '<br /><br />';
$aAux = $oUser->load($value2['USR_UID']);
$aUsr[$aAux['USR_FIRSTNAME'] . ' ' . $aAux['USR_LASTNAME']] = $aAux;
$aUsrUid[] = $value2['USR_UID'];
}
}
}
}
$aUsers = $oTasks->getUsersOfTask($aRow['TAS_UID'], 1);
foreach ($aUsers as $key => $value) {
if ($aRow['USR_UID'] != $value['USR_UID']) {
if (!in_array($value['USR_UID'], $aUsrUid)) {
$aUsr[$value['USR_FIRSTNAME'] . ' ' . $value['USR_LASTNAME']] = $value;
}
}
}
ksort($aUsr);
//$users='';
//$users='<select name="USERS"><option value="">Seleccione</option>';
foreach ($aUsr as $key => $value) {
$tpl->newBlock("users");
$name = $value['USR_FIRSTNAME'] . ' ' . $value['USR_LASTNAME'] . ' (' . $value['USR_USERNAME'] . ')';
//$users=$users."<option value='".$value['USR_UID']."'>". $name ."</option>";
$tpl->assign("USR_UID", $value['USR_UID']);
示例12: getTaskUserSelfService
public function getTaskUserSelfService($tas_uid, $appFields)
{
$oTask = new \Tasks();
$oGroup = new \Groups();
$taskNextDel = \TaskPeer::retrieveByPK($tas_uid);
$arrayTaskUser = array();
if ($taskNextDel->getTasAssignType() == "SELF_SERVICE" && trim($taskNextDel->getTasGroupVariable()) != "") {
// Self Service Value Based Assignment
$nextTaskGroupVariable = trim($taskNextDel->getTasGroupVariable(), " @#");
if (isset($appFields["APP_DATA"][$nextTaskGroupVariable])) {
$dataGroupVariable = $appFields["APP_DATA"][$nextTaskGroupVariable];
$dataGroupVariable = is_array($dataGroupVariable) ? $dataGroupVariable : trim($dataGroupVariable);
if (!empty($dataGroupVariable) && is_array($dataGroupVariable)) {
$arrayTaskUser[] = $dataGroupVariable;
} elseif (!empty($dataGroupVariable)) {
$arrayUsersOfGroup = $oGroup->getUsersOfGroup($dataGroupVariable);
foreach ($arrayUsersOfGroup as $arrayUser) {
$arrayTaskUser[] = $arrayUser["USR_UID"];
}
}
}
} else {
// Self Service
$arrayGroupsOfTask = $oTask->getGroupsOfTask($tas_uid, 1);
foreach ($arrayGroupsOfTask as $arrayGroup) {
$arrayUsersOfGroup = $oGroup->getUsersOfGroup($arrayGroup["GRP_UID"]);
foreach ($arrayUsersOfGroup as $arrayUser) {
$arrayTaskUser[] = $arrayUser["USR_UID"];
}
}
$arrayUsersOfTask = $oTask->getUsersOfTask($tas_uid, 1);
foreach ($arrayUsersOfTask as $arrayUser) {
$arrayTaskUser[] = $arrayUser["USR_UID"];
}
}
return $arrayTaskUser;
}