private void setStringValue(String value) { if (value == null || value.isEmpty()) { return; } DataInputAssociation input = input(value); DataInput targetRef = (DataInput) input.getTargetRef(); getIoSpecification(element).getDataInputs().add(targetRef); getIoSpecification(element).getInputSets().get(0).getDataInputRefs().add(targetRef); element.getDataInputAssociations().add(input); }
private DataOutput getDataOutput(Activity activity, String name) { InputOutputSpecification ioSpecification = activity.getIoSpecification(); if (ioSpecification != null) { List<DataOutput> dataOutputs = ioSpecification.getDataOutputs(); if (dataOutputs != null) { return Arrays.stream(dataOutputs.toArray(new DataOutput[dataOutputs.size()])) .filter(dataOutput -> name.equals(dataOutput.getName())) .findFirst() .orElse(null); } } return null; }
public MultipleInstanceSubProcessPropertyWriter(SubProcess process, VariableScope variableScope) { super(process, variableScope); this.miloop = bpmn2.createMultiInstanceLoopCharacteristics(); process.setLoopCharacteristics(miloop); this.ioSpec = bpmn2.createInputOutputSpecification(); this.inputSet = bpmn2.createInputSet(); this.ioSpec.getInputSets().add(inputSet); this.outputSet = bpmn2.createOutputSet(); this.ioSpec.getOutputSets().add(outputSet); process.setIoSpecification(ioSpec); }
prop.getId()); miCollectionInputDI.setItemSubjectRef(miCollectionInputDIItemDefinition); task.getIoSpecification().getDataInputs().add(miCollectionInputDI); if (task.getIoSpecification().getInputSets() == null || task.getIoSpecification().getInputSets().size() < 1) { InputSet inset = Bpmn2Factory.eINSTANCE.createInputSet(); task.getIoSpecification().getInputSets().add(inset); task.getIoSpecification().getInputSets().get(0).getDataInputRefs().add(miCollectionInputDI); loopCharacteristics.setLoopDataInputRef(miCollectionInputDI); DataInputAssociation miCollectionInputDataInputAssociation = Bpmn2Factory.eINSTANCE.createDataInputAssociation(); prop.getId()); miCollectionOutputDI.setItemSubjectRef(miCollectionOutputDIItemDefinition); task.getIoSpecification().getDataOutputs().add(miCollectionOutputDI); if (task.getIoSpecification().getOutputSets() == null || task.getIoSpecification().getOutputSets().size() < 1) { OutputSet outset = Bpmn2Factory.eINSTANCE.createOutputSet(); task.getIoSpecification().getOutputSets().add(outset); task.getIoSpecification().getOutputSets().get(0).getDataOutputRefs().add(miCollectionOutputDI); loopCharacteristics.setLoopDataOutputRef(miCollectionOutputDI); DataOutputAssociation miCollectionInputDataOutputAssociation = Bpmn2Factory.eINSTANCE.createDataOutputAssociation(); List<DataInput> dins = task.getIoSpecification().getDataInputs(); for (DataInput di : dins) { if (di.getName().equals(miDataInput)) { List<DataOutput> douts = task.getIoSpecification().getDataOutputs(); for (DataOutput dout : douts) { if (dout.getName().equals(miDataOutput)) {
task.setIoSpecification(iospec); task.getIoSpecification().getDataInputs().add(taskNameDataInput); for (DataInput processedInput : alreadyProcessedInputs.values()) { if (processedInput != null) { task.getIoSpecification().getInputSets().get(0).getDataInputRefs().add(processedInput); if (task.getIoSpecification() != null && task.getIoSpecification().getDataOutputs() != null) { List<DataInput> dataInputs = task.getIoSpecification().getDataInputs(); for (DataInput di : dataInputs) { if (di.getId().equals(task.getId() + "_" + fromPart + (fromPart.endsWith("InputX") ? "" : "InputX"))) { task.getIoSpecification().getDataInputs().add(assignmentTaskNameDataInput); dia.setTargetRef(assignmentTaskNameDataInput); InputSet inset = task.getIoSpecification().getInputSets().get(0); inset.getDataInputRefs().add(assignmentTaskNameDataInput); List<DataOutput> dataOutputs = task.getIoSpecification().getDataOutputs(); if (isDataOutput) { DataOutputAssociation doa = Bpmn2Factory.eINSTANCE.createDataOutputAssociation(); ie.setId(fromPart); dia.getSourceRef().add(ie); List<DataInput> dataInputs = task.getIoSpecification().getDataInputs(); for (DataInput di : dataInputs) { if (di.getId().equals(task.getId() + "_" + assignmentParts[1] + (assignmentParts[1].endsWith("InputX") ? "" : "InputX"))) {
Activity ac = (Activity) fe; if (ac.getIoSpecification() != null) { if (ac.getIoSpecification().getDataInputs() != null) { List<DataInput> dataInputs = ac.getIoSpecification().getDataInputs(); for (DataInput din : dataInputs) { Iterator<FeatureMap.Entry> iter = din.getAnyAttribute().iterator(); if (ac.getIoSpecification().getDataOutputs() != null) { List<DataOutput> dataOutputs = ac.getIoSpecification().getDataOutputs(); for (DataOutput dout : dataOutputs) { Iterator<FeatureMap.Entry> iter = dout.getAnyAttribute().iterator();
List<DataInput> dataInputs = task.getIoSpecification().getDataInputs(); boolean foundGroupIdInput = false; DataInput foundInput = null; d.setId(task.getId() + "_" + "GroupId" + "InputX"); d.setName("GroupId"); task.getIoSpecification().getDataInputs().add(d); foundInput = d; if (task.getIoSpecification().getInputSets() == null || task.getIoSpecification().getInputSets().size() < 1) { InputSet inset = Bpmn2Factory.eINSTANCE.createInputSet(); task.getIoSpecification().getInputSets().add(inset); task.getIoSpecification().getInputSets().get(0).getDataInputRefs().add(d); List<DataInput> dataInputs = task.getIoSpecification().getDataInputs(); boolean foundSkippableInput = false; DataInput foundInput = null; d.setId(task.getId() + "_" + "Skippable" + "InputX"); d.setName("Skippable"); task.getIoSpecification().getDataInputs().add(d); foundInput = d; if (task.getIoSpecification().getInputSets() == null || task.getIoSpecification().getInputSets().size() < 1) { InputSet inset = Bpmn2Factory.eINSTANCE.createInputSet(); task.getIoSpecification().getInputSets().add(inset); task.getIoSpecification().getInputSets().get(0).getDataInputRefs().add(d); List<DataInput> dataInputs = task.getIoSpecification().getDataInputs();
private InputSet getInputSet(InputOutputSpecification ioSpecification) { List<InputSet> inputSets = ioSpecification.getInputSets(); InputSet inputSet; if (inputSets.isEmpty()) { inputSet = bpmn2.createInputSet(); inputSets.add(inputSet); } else { inputSet = inputSets.get(0); } return inputSet; }
nextOut.getAnyAttribute().add(extensionEntry); activity.getIoSpecification().getDataOutputs().add(nextOut); outset.getDataOutputRefs().add(nextOut); activity.getIoSpecification().getOutputSets().add(outset); } else { if (activity.getIoSpecification() != null) { activity.getIoSpecification().getOutputSets().add(Bpmn2Factory.eINSTANCE.createOutputSet());
private DataInput getDataInput(Activity activity, String name) { InputOutputSpecification ioSpecification = activity.getIoSpecification(); if (ioSpecification != null) { List<DataInput> dataInputs = ioSpecification.getDataInputs(); if (dataInputs != null) { return Arrays.stream(dataInputs.toArray(new DataInput[dataInputs.size()])) .filter(dataInput -> name.equals(dataInput.getName())) .findFirst() .orElse(null); } } return null; }
private OutputSet getOutputSet(InputOutputSpecification ioSpecification) { List<OutputSet> outputSets = ioSpecification.getOutputSets(); OutputSet outputSet; if (outputSets.isEmpty()) { outputSet = bpmn2.createOutputSet(); outputSets.add(outputSet); } else { outputSet = outputSets.get(0); } return outputSet; } }
if (sp.getIoSpecification() != null && sp.getIoSpecification().getDataOutputs() != null) { List<DataInput> dataInputs = sp.getIoSpecification().getDataInputs(); for (DataInput di : dataInputs) { if (di.getId().equals(sp.getId() + "_" + fromPart + "InputX")) { List<DataOutput> dataOutputs = sp.getIoSpecification().getDataOutputs(); if (isDataOutput) { DataOutputAssociation doa = Bpmn2Factory.eINSTANCE.createDataOutputAssociation(); ie.setId(fromPart); dia.getSourceRef().add(ie); List<DataInput> dataInputs = sp.getIoSpecification().getDataInputs(); for (DataInput di : dataInputs) { if (di.getId().equals(sp.getId() + "_" + assignmentParts[1] + "InputX")) { sp.setIoSpecification(iospec); } else { sp.getIoSpecification().getDataInputs().clear(); sp.getIoSpecification().getDataOutputs().clear(); sp.getDataInputAssociations().clear(); sp.getDataOutputAssociations().clear(); InputSet inset = sp.getIoSpecification().getInputSets().get(0); DataInput multiInput = Bpmn2Factory.eINSTANCE.createDataInput(); multiInput.setId(sp.getId() + "_" + "input"); multiInput.setName(inputCollectionStr); sp.getIoSpecification().getDataInputs().add(multiInput); inset.getDataInputRefs().add(multiInput); DataInputAssociation dia = Bpmn2Factory.eINSTANCE.createDataInputAssociation();
if (task instanceof UserTask && task.getIoSpecification() != null && task.getIoSpecification().getDataInputs() != null) { List<DataInput> taskDataInputs = task.getIoSpecification().getDataInputs(); for (DataInput din : taskDataInputs) { if (din.getName() != null && din.getName().equals("TaskName")) { List<DataInput> taskDataInputs = task.getIoSpecification().getDataInputs(); for (DataInput din : taskDataInputs) { if (din != null && din.getItemSubjectRef() != null && taskmi.getInputDataItem() != null && taskmi.getInputDataItem().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) { DataInput notStartedNotificationInput = null; if (task.getIoSpecification() != null) { List<InputSet> inputSetList = task.getIoSpecification().getInputSets(); for (InputSet inset : inputSetList) { List<DataInput> dataInputList = inset.getDataInputRefs();
if (callActivity.getIoSpecification() != null && callActivity.getIoSpecification().getDataOutputs() != null) { List<DataInput> dataInputs = callActivity.getIoSpecification().getDataInputs(); for (DataInput di : dataInputs) { if (di.getId().equals(callActivity.getId() + "_" + fromPart + "InputX")) { isDataOutput = true; List<DataOutput> dataOutputs = callActivity.getIoSpecification().getDataOutputs(); if (isDataOutput) { ie.setId(fromPart); dia.getSourceRef().add(ie); List<DataInput> dataInputs = callActivity.getIoSpecification().getDataInputs(); for (DataInput di : dataInputs) { if (di.getId().equals(callActivity.getId() + "_" + assignmentParts[1] + "InputX")) {
private InputOutputSpecification getIoSpecification(Task element) { InputOutputSpecification ioSpecification = element.getIoSpecification(); if (ioSpecification == null) { ioSpecification = bpmn2.createInputOutputSpecification(); element.setIoSpecification(ioSpecification); } List<InputSet> inputSets = ioSpecification.getInputSets(); if (inputSets.isEmpty()) { inputSets.add(bpmn2.createInputSet()); } return ioSpecification; }
private DataInput getDataInput(Activity activity, String name) { InputOutputSpecification ioSpecification = activity.getIoSpecification(); if (ioSpecification != null) { List<DataInput> dataInputs = ioSpecification.getDataInputs(); if (dataInputs != null) { return Arrays.stream(dataInputs.toArray(new DataInput[dataInputs.size()])) .filter(dataInput -> name.equals(dataInput.getName())) .findFirst() .orElse(null); } } return null; }
private String marshallDataOutputSet(Activity activity, Map<String, Object> properties, List<String> disallowedNames) { if (activity.getIoSpecification() != null) { List<OutputSet> outputSetList = activity.getIoSpecification().getOutputSets(); StringBuilder dataOutBuffer = new StringBuilder(); for (OutputSet outset : outputSetList) { List<DataOutput> dataOutputList = outset.getDataOutputRefs(); marshallItemAwareElements(activity, dataOutputList, dataOutBuffer, disallowedNames); } if (dataOutBuffer.length() > 0) { dataOutBuffer.setLength(dataOutBuffer.length() - 1); } String dataoutputset = dataOutBuffer.toString(); properties.put(DATAOUTPUTSET, dataoutputset); return dataoutputset; } else { return null; } }
if (task.getIoSpecification().getInputSets() == null || task.getIoSpecification().getInputSets().size() < 1) { InputSet inset = Bpmn2Factory.eINSTANCE.createInputSet(); task.getIoSpecification().getInputSets().add(inset); InputSet inSet = task.getIoSpecification().getInputSets().get(0); boolean foundDataInput = false; for (DataInput dataInput : inSet.getDataInputRefs()) { d.setId(task.getId() + "_" + da.getId() + "InputX"); d.setName(da.getId() + "InputX"); task.getIoSpecification().getDataInputs().add(d); task.getIoSpecification().getInputSets().get(0).getDataInputRefs().add(d); DataInputAssociation dia = Bpmn2Factory.eINSTANCE.createDataInputAssociation(); dia.setTargetRef(d); if (task.getIoSpecification().getOutputSets() == null || task.getIoSpecification().getOutputSets().size() < 1) { OutputSet outSet = Bpmn2Factory.eINSTANCE.createOutputSet(); task.getIoSpecification().getOutputSets().add(outSet); OutputSet outSet = task.getIoSpecification().getOutputSets().get(0); for (DataOutput dataOut : outSet.getDataOutputRefs()) { if (dataOut.getId().equals(task.getId() + "_" + da.getId() + "OutputX")) { d.setId(task.getId() + "_" + da.getId() + "OutputX"); d.setName(da.getId() + "OutputX"); task.getIoSpecification().getDataOutputs().add(d); task.getIoSpecification().getOutputSets().get(0).getDataOutputRefs().add(d); DataOutputAssociation doa = Bpmn2Factory.eINSTANCE.createDataOutputAssociation(); doa.getSourceRef().add(d);
ioSpec.getDataInputs().add(dataInput); DataOutput dataOutput = output.getDataOutput(); getOutputSet(ioSpec).getDataOutputRefs().add(dataOutput); ioSpec.getDataOutputs().add(dataOutput);
nextInput.getAnyAttribute().add(extensionEntry); activity.getIoSpecification().getDataInputs().add(nextInput); inset.getDataInputRefs().add(nextInput); activity.getIoSpecification().getInputSets().add(inset); } else { if (activity.getIoSpecification() != null) { activity.getIoSpecification().getInputSets().add(Bpmn2Factory.eINSTANCE.createInputSet());