/** * * @method * * Add case note. * * @name WSAddCaseNote * @label WS Add case note * @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#WSAddCaseNote.28.29 * * @param string(32) | $caseUid | ID of the case | The unique ID of the case. * @param string(32) | $processUid | ID of the process | The unique ID of the process. * @param string(32) | $taskUid | ID of the task | The unique ID of the task. * @param string(32) | $userUid | ID user | The unique ID of the user who will add note case. * @param string | $note | Note of the case | Note of the case. * @param int | $sendMail = 1 | Send mail | Optional parameter. If set to 1, will send an email to all participants in the case. * @return array | $response | WS array | A WS Response associative array. * */ function WSAddCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail = 1) { $client = WSOpen(); $sessionId = $_SESSION["WS_SESSION_ID"]; $params = array("sessionId" => $sessionId, "caseUid" => $caseUid, "processUid" => $processUid, "taskUid" => $taskUid, "userUid" => $userUid, "note" => $note, "sendMail" => $sendMail); $result = $client->__soapCall("addCaseNote", array($params)); $response = array(); $response["status_code"] = $result->status_code; $response["message"] = $result->message; $response["time_stamp"] = $result->timestamp; return $response; }
/** * @method * * Creates a new user in ProcessMaker. * * @name WSCreateUser * @label WS Create User * @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#WSCreateUser.28.29 * * @param string(32) | $userId | User ID | The username of the new user, which can be up to 32 characters long. * @param string(32) | $password | Password of the new user | El password of the new user, which can be up to 32 characters long. * @param string(32) | $firstname | Firstname of the new user | The first name(s) of the new user, which can be up to 50 characters long. * @param string(32) | $lastname | Lastname of the new user | The last name(s) of the new user, which can be up to 50 characters long. * @param string(32) | $email | Email the new user | The e-mail of the new user, which can be up to 100 characters long. * @param string(32) | $role | Rol of the new user | The role of the new user, such as 'PROCESSMAKER_ADMIN' and 'PROCESSMAKER_OPERATOR'. * @param string(32) | $dueDate=null | Expiration date | Optional parameter. The expiration date must be a string in the format 'yyyy-mm-dd'. * @param string(32) | $status=null | Status of the new user | Optional parameter. The user's status, such as 'ACTIVE', 'INACTIVE' or 'VACATION'. * @return array | $fields | WS array | A WS Response associative array. * */ function WSCreateUser($userId, $password, $firstname, $lastname, $email, $role, $dueDate = null, $status = null) { $client = WSOpen(); $sessionId = $_SESSION["WS_SESSION_ID"]; $params = array("sessionId" => $sessionId, "userId" => $userId, "firstname" => $firstname, "lastname" => $lastname, "email" => $email, "role" => $role, "password" => $password, "dueDate" => $dueDate, "status" => $status); $result = $client->__soapCall("CreateUser", array($params)); $fields["status_code"] = $result->status_code; $fields["message"] = $result->message; $fields["time_stamp"] = $result->timestamp; return $fields; }