generator.writeStartObject();
generator.writeObjectField("resourceId", outgoing.getId());
generator.writeEndObject();
}
// we need to also add associations as outgoing elements
Process process = (Process) plane.getBpmnElement();
for (Artifact artifact : process.getArtifacts()) {
if (artifact instanceof Association){
Association association = (Association) artifact;
if (association.getSourceRef().getId().equals(node.getId())) {
generator.writeStartObject();
generator.writeObjectField("resourceId", association.getId());
generator.writeEndObject();
}
}
}
// and boundary events for activities
for(FlowElement fe : process.getFlowElements()) {
if(fe instanceof BoundaryEvent) {
if(((BoundaryEvent) fe).getAttachedToRef().getId().equals(node.getId())) {
generator.writeStartObject();
generator.writeObjectField("resourceId", fe.getId());
generator.writeEndObject();