Skip to content

Commit

Permalink
Issue #504
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrojdeCTL committed Sep 17, 2018
1 parent 20e73bb commit f46192f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,7 @@ else if ("designer".equals(query.getFilter("mdw-app"))) {
// retrieving summary for activity instance
if (processList.getCount() == 0)
throw new ServiceException(ServiceException.NOT_FOUND, "Process instance not found: " + query);
JSONObject json = processList.getProcesses().get(0).getJson();
json.put("definitionId", json.getLong("processId"));
json.put("name", json.getString("processName"));
return json;
return getSummaryJson(processList.getProcesses().get(0));
}
else {
return processList.getJson();
Expand Down Expand Up @@ -299,7 +296,8 @@ protected JSONObject getSummaryJson(ProcessInstance process) {
summary.put("templatePackage", process.getTemplatePackage());
summary.put("templateVersion", process.getTemplateVersion());
Process latestTemplate = ProcessCache.getProcess(process.getTemplatePackage() + "/" + process.getTemplate());
if (latestTemplate != null && !latestTemplate.getId().equals(process.getProcessId()))
// If null it means it is archived but was renamed or removed from current assets
if (latestTemplate == null || !latestTemplate.getId().equals(process.getProcessId()))
summary.put("archived", true);
}
else {
Expand Down
2 changes: 2 additions & 0 deletions mdw-workflow/assets/com/centurylink/mdw/react/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const process = {
else if (instanceId) {
this.getInstance(serviceBase, instanceId, null, instance => {
var path = instance.packageName + '/' + instance.processName;
if (instance.processVersion)
path += "/v" + instance.processVersion;
this.getProcess(serviceBase, path, process => {
process.packageName = instance.packageName;
process.instance = instance;
Expand Down

0 comments on commit f46192f

Please sign in to comment.