public void setAssignmentsInfo(AssignmentsInfo info) { ParsedAssignmentsInfo assignmentsInfo = ParsedAssignmentsInfo.of(info); List<InitializedOutputVariable> outputs = assignmentsInfo.createInitializedOutputVariables( getId(), variableScope); if (outputs.isEmpty()) { return; } if (outputs.size() > 1) { throw new IllegalArgumentException("Output Associations should be at most 1 in Catch Events"); } InitializedOutputVariable output = outputs.get(0); DataOutput dataOutput = output.getDataOutput(); event.getDataOutputs().add(dataOutput); getOutputSet().getDataOutputRefs().add(dataOutput); this.addItemDefinition(dataOutput.getItemSubjectRef()); DataOutputAssociation dataOutputAssociation = output.getDataOutputAssociation(); if (dataOutputAssociation != null) { event.getDataOutputAssociation().add(dataOutputAssociation); } }
String type = Optional.ofNullable(output.getItemSubjectRef()) .map(ItemDefinition::getStructureRef) .orElse(output.getAnyAttribute().get(0).getValue().toString());
if (taskmi.getOutputDataItem() != null && taskmi.getOutputDataItem().getItemSubjectRef() != null) { List<DataOutput> taskDataOutputs = task.getIoSpecification().getDataOutputs(); for (DataOutput dout : taskDataOutputs) { if (dout != null && dout.getItemSubjectRef() != null && taskmi.getOutputDataItem() != null && taskmi.getOutputDataItem().getItemSubjectRef() != null) { if (dout.getItemSubjectRef().getId().equals(taskmi.getOutputDataItem().getItemSubjectRef().getId())) { properties.put("multipleinstancedataoutput", dout.getName());
if (taskDataOutputs != null) { for (DataOutput dout : taskDataOutputs) { if (dout.getItemSubjectRef() == null) { properties.put(MULTIPLEINSTANCEDATAOUTPUT, taskmi.getOutputDataItem().getId()); break; if (dout.getItemSubjectRef() != null && dout.getItemSubjectRef().getId().equals(taskmi.getOutputDataItem().getItemSubjectRef().getId())) { properties.put(MULTIPLEINSTANCEDATAOUTPUT, dout.getName());
DataOutput outputDataItemObj = Bpmn2Factory.eINSTANCE.createDataOutput(); outputDataItemObj.setId("miDataOutputX"); outputDataItemObj.setItemSubjectRef(dout.getItemSubjectRef()); loopCharacteristics.setOutputDataItem(outputDataItemObj); break;