Rollback Activity Instances
API Type
REST
HTTP Method
POST
Description
Activates target activity instances by cancelling the source activity instances.
Good to Know
- All the source activity instances must be activated and all the destination activity instances must not be activated when this method is called.
- To call this method, the API account user must have the access right, Rollback a Process.
URL Format (OnPremises, Private Cloud)
https://[domain]:[port]/AgilePointServer/Workflow/RollbackActivityInsts
URL Format (OnDemand)
https://[domain]:[port]/AgilePointService/Workflow/RollbackActivityInsts
Request Parameters
Name | Description |
---|---|
None | Not Applicable |
Request Body Properties
Name | Description |
---|---|
instruction |
|
JavaScript Code Example
$("#btnRollbackActivityInsts").click(function () {
var JSONData = {"PartialRollbackUnits":
[{"DestinationActivityInstanceID":"DF93620D4ED14458B60857C4EA862702",
"SourceActivityInstanceIDs":["575CB3B3C2EB495B884B0AD1505D4E0A"]}
]};
$.ajax({
url: 'https://mydomain:9011/AgilePointServer/Workflow/RollbackActivityInsts',
data: JSON.stringify(JSONData)
});
});
Java Code Example
public String RollbackActivityInsts(){
String URI = "https://mydomain:9011/AgilePointServer/Workflow/RollbackActivityInsts";
HTTPOperations ops = new HTTPOperations(domain, userName,
password, appID, locale);
JSONObject postData = new JSONObject();
JSONArray ids = new JSONArray();
ids.put("575CB3B3C2EB495B884B0AD1505D4E0A");
JSONObject data = new JSONObject();
data.put("DestinationActivityInstanceID", "DF93620D4ED14458B60857C4EA862702");
data.put("SourceActivityInstanceIDs", ids);
JSONArray partialRollbackUnits = new JSONArray();
partialRollbackUnits.put(data);
postData.append("PartialRollbackUnits", partialRollbackUnits);
return ops.POSTMethod(URI, postData.toString());
return "";
}
C# Code Example
public string RollbackActivityInsts()
{
string URI = "https://mydomain:9011/AgilePointServer/Workflow/RollbackActivityInsts";
string jsonRequestData = "{
\"PartialRollbackUnits\":[{
\"DestinationActivityInstanceID\":\"DF93620D4ED14458B60857C4EA862702\",
\"SourceActivityInstanceIDs\":[
\"575CB3B3C2EB495B884B0AD1505D4E0A\"]}]}";
HTTPOperations ops = new HTTPOperations(domain, this.userName,
password, appID, locale);
return ops.POSTMethod(URI, jsonRequestData);
}
Output
WFEvent object that provides the status of the transaction. The possible statuses are:
- Sent - Indicates event has been sent to engine for processing.
- Failed - Indicates event failed to process.
- Processed - Indicates event has been processed successfully.
- Canceled - Indicates event was canceled.
- Deferred - Indicates event does not need to be sent immediately.
JSON Response Body Example
{
"ActivityInstID":"String content",
"AutoStart":true,
"CustomAttributes":[{
"Name":"String content",
"Value":{
"NameValue":{
"Name":"String content",
"Value":{
"NameValue":null
}
}
}
}],
"Diagnostic":true,
"EndDate":"\/Date(928149600000+0000)\/",
"Entries":2147483647,
"Error":"String content",
"EventID":"String content",
"EventName":"String content",
"HighPriority":true,
"ParamsXml":"String content",
"ParentProcInstID":"String content",
"ProcDefID":"String content",
"ProcInstID":"String content",
"ProcInstName":"String content",
"Sender":"String content",
"SentDate":"\/Date(928149600000+0000)\/",
"SourceWorkItemID":"String content",
"Status":"String content",
"TenantID":"String content",
"UserID":"String content",
"WorkItemID":"String content",
"WorkObjectID":"String content",
"WorkObjectInfo":"String content"
}
Supported Versions
AgilePoint v5.0 R2 and higher
Code Examples in the AgilePoint NX Documentation
The AgilePoint NX Product Documentation is intended as a basic reference to help you understand how to complete basic coding tasks, such as make API or JavaScript method calls. Code examples that show specific use cases, the solutions to specific business problems, or detailed implementation scenarios are outside the scope of the AgilePoint NX Product Documentation. For specific and/or advanced types of examples that may better meet your requirements, AgilePoint provides several resources:
- AgilePoint Community Forums - A free, AgilePoint-moderated, crowd-sourcing user forum where you can ask questions about specific techniques, the solutions to use cases, workarounds, or other topics that may not be covered in the Product Documentation.
- Professional Services - If you can not find the information you need for your specific business problem, mentoring is available through AgilePoint Professional Services.
- Personalized Training - AgilePoint can provide personalized training for your organization. To request personalized training, contact AgilePoint Sales.