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 FromUser, String ToUser, String StartDate, String EndDate, String Description, String Status) { String URI = "http://mydomain:9011/AgilePointServer/Admin/AddDelegation"; HTTPOperations ops = new HTTPOperations(domain, this.userName, password, appID, locale); JSONObject postData = new JSONObject(); try { postData.put("FromUser", FromUser); postData.put("ToUser", ToUser); postData.put("StartDate", StartDate); postData.put("EndDate", EndDate); postData.put("Description", Description); postData.put("Status", Status); return ops.POSTMethod(URI, postData.toString()); } catch (JSONException e1) { e1.printStackTrace(); } return ""; }
public string AddDelegation(string username, string username1) { string gh=@"\/Date(928149600000+0000)\/"; string jsonRequestData = "{ \"FromUser\":\"" + username + "\", \"ToUser\":\"" + username1 + "\", \"StartDate\":\"" + gh + "\", \"EndDate\":\"" + gh + "\", \"Description\":\"" + "Milind Test" + "\", \"Status\":\"" + "Created" + "\"}"; string URI = "http://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