function processList($t, $uid_Process, $process_uid_library) { $processes = ws_processList(); $t->is(count($processes->processes) >= 0, true, 'ws_processList works fine'); $foundProcess = false; if (is_array($processes->processes)) { foreach ($processes->processes as $key => $val) { if ($val->guid == $uid_Process) { $foundProcess = true; } } } else { if ($processes->processes->guid == $uid_Process) { $foundProcess = true; } } if ($foundProcess) { $t->is($foundProcess, true, 'Process for' . $uidName[1] . 'is present in this Workspace'); } else { $res = ws_importProcessFromLibrary($process_uid_library, '', 3, PML_USER_ID, PML_USER_PASS); if ($res->status_code == 0) { $t->is($res->status_code, 0, 'Process imported from Library successfully'); $t->diag(' processTitle ' . $res->processTitle); $t->diag(' category ' . $res->category); $t->diag(' version ' . $res->version); } else { throw new Exception($res->message . ". Process '" . $uid_Process . "' "); } } }
$foundProcess = false; if (is_array($processes->processes)) { foreach ($processes->processes as $key => $val) { if ($val->guid == PROCESS_UID) { $foundProcess = true; } } } else { if ($processes->processes->guid == PROCESS_UID) { $foundProcess = true; } } if ($foundProcess) { $t->is($foundProcess, true, 'Sequential Process is present in this Workspace'); } else { $res = ws_importProcessFromLibrary(PROCESS_UID_LIBRARY, ''); if ($res->status_code == 0) { $t->is($res->status_code, 0, 'Process imported from Library successfully'); $t->diag(' processTitle ' . $res->processTitle); $t->diag(' category ' . $res->category); $t->diag(' version ' . $res->version); } else { throw new Exception($res->message . ". Process '" . PROCESS_UID . "' "); } } //checking the groupList $groups = ws_groupList(); $t->is(count($groups->groups) >= 2, true, 'ws_groupList works fine'); $foundGroup1 = false; $foundGroup2 = false; foreach ($groups->groups as $key => $val) {