| Methods / Methods for Manual Work Items (Tasks) | |
REST
POST
Creates a task by a specific AgileWork or other module that has the following characteristics:
This provides a way for tasks to be included in a user's or manager's task list purely for monitoring purposes.
https://[domain]:[port]/AgilePointServer/Workflow/CreatePseudoWorkItem
https://[domain]:[port]/AgilePointService/Workflow/CreatePseudoWorkItem
| Name | Description |
|---|---|
| None | Not Applicable |
| Name | Description |
|---|---|
bReserved |
|
BusinessTime |
|
ClientData |
|
Length |
|
SourceWorkItemID |
|
Unit |
|
UserID |
|
WorkToPerform |
|
These properties are based on the class CreatePseudoWorkItemHelper
$("#btnCreatePseudoWorkItem").click(function () {
var JSONObject = {
SourceWorkItemID: "2AA1E203047B41F29E3E29F62D00903B",
WorkToPerform: "Test1234",
UserID: "demo3\\brian.lucas",
Length: "2",
Unit: "DAY",
BusinessTime:true,
bReserved: true,
ClientData: null
};
$.ajax({
url: "https://mydomain:9011/AgilePointServer/Workflow/CreatePseudoWorkItem",
data: JSON.stringify(JSONObject)
});
}
});
public String CreatePseudoWorkItem(String SourceWorkItemID,
String WorkToPerform, String UserID, String Length, String Unit,
boolean BusinessTime, boolean bReserved, boolean ClientData) {
String URI = "http://mydomain:9011/AgilePointServer/Workflow/CreatePseudoWorkItem";
HTTPOperations ops = new HTTPOperations(domain, this.userName,
password, appID, locale);
JSONObject postData = new JSONObject();
try {
postData.put("SourceWorkItemID", SourceWorkItemID);
postData.put("WorkToPerform", WorkToPerform);
postData.put("UserID", UserID);
postData.put("Length", Length);
postData.put("Unit", Unit);
postData.put("BusinessTime", BusinessTime);
postData.put("bDependent", bReserved);
postData.put("ClientData", ClientData);
return ops.POSTMethod(URI, postData.toString());
} catch (JSONException e1) {
e1.printStackTrace();
}
return "";
}
public string btnCreatePseudoWorkItem()
{
string URL = "http://mydomain:9011/AgilePointServer/Workflow/CreatePseudoWorkItem";
string jsonRequestData = "{
\"SourceWorkItemID\":\"E48644178C514A95AB457F00A35F1550\",
\"WorkToPerform\":\"Test1234\",
\"UserID\":\"ap2\\administrator\",
\"Length\":\"2\",
\"Unit\":\"DAY\",
\"BusinessTime\":\"true\",
\"bReserved\":\"true\",
\"ClientData\":\"" + null + "\"}";
HTTPOperations ops = new HTTPOperations(domain, this.userName,
password, appID, locale);
return ops.POSTMethod(URL, jsonRequestData);
}
WFEvent object that provides the status of the transaction. The possible statuses are:
{
"ActivityInstID": "0DB05C1A1BAB445895CCF46E096AECDD",
"AutoStart": true,
"CustomAttributes": null,
"Diagnostic": true,
"EndDate": "\/Date(928149600000+0000)\/",
"Entries": 1,
"Error": null,
"EventID": "572215CBEA884B7890259879C21FAC42",
"EventName": "CreateWorkItem",
"HighPriority": true,
"ParamsXml": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<WFEvent>
<param name=\"ExpectedTime\"
value=\"2 Day(s)(business time)\" \/>
<param name=\"workPerformer\" value=\"Revise\" \/>
<param name=\"SourceWorkItemID\"
value=\"2AA1E203047B41F29E3E29F62D00903B\" \/>
<param name=\"ProcInstID\"
value=\"B7F0ACFA610349B4BF10A4DAB8E93458\" \/>
<param name=\"UserID\" value=\"demo3\\brian.lucas\" \/>
<param name=\"ActivityInstID\"
value=\"0DB05C1A1BAB445895CCF46E096AECDD\" \/>
<param name=\"waitWorkPerformed\" value=\"True\" \/>
<param name=\"HighPriority\" value=\"True\" \/>
<param name=\"Carbon\" value=\"False\" \/>
<param name=\"WorkItemID\"
value=\"CE4265BC8CA944F885446962D0463974\" \/>
<\/WFEvent>",
"ParentProcInstID": "",
"ProcDefID": "",
"ProcInstID": "B7F0ACFA610349B4BF10A4DAB8E93458",
"ProcInstName": "",
"Sender": "demo3\\brian.lucas",
"SentDate": "\/Date(1394148475011+0000)\/",
"SourceWorkItemID": "2AA1E203047B41F29E3E29F62D00903B",
"Status": "Sent",
"UserID": "demo3\\brian.lucas",
"WorkItemID": "CE4265BC8CA944F885446962D0463974",
"WorkObjectID": "",
"WorkObjectInfo": ""
}
AgilePoint BPMS v5.0 R2 and higher