I have got this working although it took a bit of messing about modifications to BpmnJsonConverter.java at line 247 insert
<code>
if (CollectionUtils.isNotEmpty(mainProcess.getCandidateStarterUsers()) || CollectionUtils.isNotEmpty(mainProcess.getCandidateStarterGroups())) {
ObjectNode candidatesNode = objectMapper.createObjectNode();
ObjectNode candidateValuesNode = objectMapper.createObjectNode();
if (CollectionUtils.isNotEmpty(mainProcess.getCandidateStarterUsers())) {
ArrayNode candidateArrayNode = objectMapper.createArrayNode();
for (String candidateUser : mainProcess.getCandidateStarterUsers()) {
ObjectNode candidateNode = objectMapper.createObjectNode();
candidateNode.put("value", candidateUser);
candidateArrayNode.add(candidateNode);
}
candidateValuesNode.put(PROPERTY_USERTASK_CANDIDATE_USERS, candidateArrayNode);
}
if (CollectionUtils.isNotEmpty(mainProcess.getCandidateStarterGroups())) {
ArrayNode candidateArrayNode = objectMapper.createArrayNode();
for (String candidateGroup : mainProcess.getCandidateStarterGroups()) {
ObjectNode candidateNode = objectMapper.createObjectNode();
candidateNode.put("value", candidateGroup);
candidateArrayNode.add(candidateNode);
}
candidateValuesNode.put(PROPERTY_USERTASK_CANDIDATE_GROUPS, candidateArrayNode);
}
candidatesNode.put("assignment", candidateValuesNode);
propertiesNode.put(PROPERTY_PROCESS_CANDIDATE, candidatesNode);
}
</code>
at line 518
<code>
JsonNode candidateNode = JsonConverterUtil.getProperty(PROPERTY_PROCESS_CANDIDATE, modelNode);
if (candidateNode != null) {
JsonNode assignmentDefNode = candidateNode.get("assignment");
if (assignmentDefNode != null) {
process.setCandidateStarterUsers(getValueAsList(PROPERTY_USERTASK_CANDIDATE_USERS, assignmentDefNode));
process.setCandidateStarterGroups(getValueAsList(PROPERTY_USERTASK_CANDIDATE_GROUPS, assignmentDefNode));
}
}
</code>
and in StencilConstants.java
<code>final String PROPERTY_PROCESS_CANDIDATE = "process_candidates";</code>
in stencilset.json add a new package
<code>
{
"name" : "process_candidatespackage",
"properties" : [ {
"id" : "process_candidates",
"type" : "Complex",
"title" : "Candidates",
"value" : "",
"description" : "Candidate Groups and Users",
"popular" : true
} ]
}
</code>
then add process_candidatespackage to the propertyPackages in the BPMNDiagram Stencil
this will use the standard assignment-popup.html and associated controller, I have made some styling tweaks to these but basically unchanged apart from removing the <code>assignment.assignee</code> text input if we are dealing with a process rather than a user task.
finally and I am not overly confident with this I have removed the toJson methods from prototype.js these were conflicting with some JSON.stringify() calls in oryx basically have included the following in app.js
<code>
if(window.Prototype) {
delete Object.prototype.toJSON;
delete Array.prototype.toJSON;
delete Hash.prototype.toJSON;
delete String.prototype.toJSON;
}
</code>
I also noticed that oryx was serializing the properties on the canvas stencil so I have commented this out, I have not fully tested the ramifications of this but so far all is well
comented out line 9662
<code>
//if (Object.prototype.toString.call(value) === "Object") value = JSON.stringify(value);
</code>
and lines 11353 to 11357
<code>
//*
if (!(typeof value === "string") && (!prop || !prop.isList())) {
value = JSON.stringify(value);
}
*/
</code>
hope this pushes you in the right direction