Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Commit

Permalink
BZ 1216108 - 'Content' assignment is not preserved in REST Task
Browse files Browse the repository at this point in the history
  • Loading branch information
Tihomir Surdilovic committed Apr 29, 2015
1 parent 810bdf2 commit 980ea22
Showing 1 changed file with 30 additions and 19 deletions.
Expand Up @@ -1799,27 +1799,38 @@ protected void marshallTask(Task task, BPMNPlane plane, JsonGenerator generator,
associationValue = "";
}

// don't include properties that have their independent input editors:
if(!(rhsAssociation.equals("GroupId") ||
rhsAssociation.equals("Skippable") ||
rhsAssociation.equals("Comment") ||
rhsAssociation.equals("Priority") ||
rhsAssociation.equals("Content") ||
rhsAssociation.equals("TaskName") ||
rhsAssociation.equals("Locale") ||
rhsAssociation.equals("CreatedBy") ||
rhsAssociation.equals("NotCompletedReassign") ||
rhsAssociation.equals("NotStartedReassign") ||
rhsAssociation.equals("NotCompletedNotify") ||
rhsAssociation.equals("NotStartedNotify")
)) {
String replacer = associationValue.replaceAll(",", "##");
associationBuff.append("[din]" + rhsAssociation).append("=").append(replacer);
associationBuff.append(",");

properties.put(rhsAssociation.toLowerCase(), associationValue);
// don't include properties that have their independent input editors
if(isCustomElement((String) properties.get("taskname"), preProcessingData)) {
if(!(rhsAssociation.equals("TaskName"))) {
String replacer = associationValue.replaceAll(",", "##");
associationBuff.append("[din]" + rhsAssociation).append("=").append(replacer);
associationBuff.append(",");

properties.put(rhsAssociation.toLowerCase(), associationValue);
}
} else {
if(!(rhsAssociation.equals("GroupId") ||
rhsAssociation.equals("Skippable") ||
rhsAssociation.equals("Comment") ||
rhsAssociation.equals("Priority") ||
rhsAssociation.equals("Content") ||
rhsAssociation.equals("TaskName") ||
rhsAssociation.equals("Locale") ||
rhsAssociation.equals("CreatedBy") ||
rhsAssociation.equals("NotCompletedReassign") ||
rhsAssociation.equals("NotStartedReassign") ||
rhsAssociation.equals("NotCompletedNotify") ||
rhsAssociation.equals("NotStartedNotify")
)) {
String replacer = associationValue.replaceAll(",", "##");
associationBuff.append("[din]" + rhsAssociation).append("=").append(replacer);
associationBuff.append(",");

properties.put(rhsAssociation.toLowerCase(), associationValue);
}
}


if(rhsAssociation.equalsIgnoreCase("TaskName")) {
properties.put("taskname", associationValue);
}
Expand Down

0 comments on commit 980ea22

Please sign in to comment.