| Methods / User Delegation | |
REST
POST
Creates a rule for delegating one user's tasks to another user. This method uses the WFDelegation class. For more information, see the AgilePoint Class Reference.
https://[domain]:[port]/AgilePointServer/Admin/AddDelegation
https://[domain]:[port]/AgilePointService/Admin/AddDelegation
| Name | Description |
|---|---|
| None | Not Applicable |
| Name | Description |
|---|---|
FromUser |
|
ToUser |
|
StartDate |
|
EndDate |
|
Description |
|
$("#btnAddDelegation").click(function () {
var JSONObject = {
FromUser: "demo3\\brian.lucas",
ToUser: "demo3\\lilly.allen",
StartDate: '\/Date(' + new Date().getTime() + '-0000)\/',
EndDate: '\/Date(' + new Date().getTime() + '-0000)\/',
Description: "Rest Test", Status: "Created"
};
$.ajax({
url: "https://mydomain:9011/AgilePointServer/Admin/AddDelegation",
data: JSON.stringify(JSONObject)
});
});
public String AddDelegation() {
String URI = "https://mydomain:9011/AgilePointServer/Admin/AddDelegation";
HTTPOperations ops = new HTTPOperations(domain, userName,
password, appID, locale);
JSONObject postData = new JSONObject();
postData.put("FromUser", "DEMO3\\liy.allen");
postData.put("ToUser", "DEMO3\\bob.hope");
postData.put("StartDate", "/Date("
+ Calendar.getInstance().getTimeInMillis() + "+0000)/");
postData.put("EndDate", "/Date("
+ Calendar.getInstance().getTimeInMillis() + "+0000)/");
postData.put("Description", "Vacation");
postData.put("Status", "Created");
return ops.POSTMethod(URI, postData.toString());
} catch (JSONException e1) {
e1.printStackTrace();
return "";
}
public string AddDelegation()
{
string gh=@"\/Date(928149600000+0000)\/";
string jsonRequestData = "{
\"FromUser\":\"" + "DEMO3\\liy.allen" + "\",
\"ToUser\":\"" + "DEMO3\\bob.hope" + "\",
\"StartDate\":\"" + gh + "\",
\"EndDate\":\"" + gh + "\",
\"Description\":\"" + "My sample delegation" + "\",
\"Status\":\"" + "Created" + "\"}";
string URI = "https://mydomain:9011/AgilePointServer/Admin/AddDelegation";
HTTPOperations ops = new HTTPOperations(domain, this.userName,
password, appID, locale);
return ops.POSTMethod(URI, jsonRequestData);
}
WFDelegation object.
{
"CancelledBy": null,
"CancelledDate": "\/Date(928149600000+0000)\/",
"CreatedBy": "demo3\\brian.lucas",
"CreatedDate": "\/Date(1394154711507+0000)\/",
"DelegationID": "77F9A9946CF74545B4C8A27956CDA036",
"Description": "Rest Test",
"EndDate": "\/Date(28799000+0000)\/",
"FromUser": "demo3\\brian.lucas",
"LastUpdatedBy": null,
"LastUpdatedDate": "\/Date(928149600000+0000)\/",
"ProcDefIDS": "",
"RecWeekdaysString": "",
"StartDate": "\/Date(-57600000+0000)\/",
"Status": "Created",
"ToUser": "demo3\\lilly.allen"
}
AgilePoint BPMS v5.0 R2 and higher