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); }
public DataInput createDataInput(String name) { DataInput dataInput = bpmn2.createDataInput(); dataInput.setId(Ids.dataInput(process.getId(), name)); dataInput.setName(name); this.ioSpec.getDataInputs().add(dataInput); return dataInput; }
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 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; }
nextInput.getAnyAttribute().add(extensionEntry); activity.getIoSpecification().getDataInputs().add(nextInput); inset.getDataInputRefs().add(nextInput);
List<DataInput> dataInputs = callActivity.getIoSpecification().getDataInputs(); for (DataInput di : dataInputs) { if (di.getId().equals(callActivity.getId() + "_" + fromPart + "InputX")) { 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")) {
task.setIoSpecification(iospec); task.getIoSpecification().getDataInputs().add(taskNameDataInput); boolean foundTaskName = false; 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.setIoSpecification(iospec); task.getIoSpecification().getDataInputs().add(assignmentTaskNameDataInput); dia.setTargetRef(assignmentTaskNameDataInput); InputSet inset = task.getIoSpecification().getInputSets().get(0); 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();
ioSpec.getDataInputs().add(dataInput);
List<DataInput> dataInputs = sp.getIoSpecification().getDataInputs(); for (DataInput di : dataInputs) { if (di.getId().equals(sp.getId() + "_" + fromPart + "InputX")) { 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(); 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) {
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(); List<DataInput> dins = task.getIoSpecification().getDataInputs(); for (DataInput di : dins) { if (di.getName().equals(miDataInput)) { DataInputAssociation dias = Bpmn2Factory.eINSTANCE.createDataInputAssociation(); dias.getSourceRef().add(((MultiInstanceLoopCharacteristics) task.getLoopCharacteristics()).getInputDataItem()); List<DataInput> dins = task.getIoSpecification().getDataInputs(); for (DataInput di : dins) { if (di.getName().equals(miDataInput)) {
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) { 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) { List<DataInput> dataInputs = task.getIoSpecification().getDataInputs(); boolean foundCommentInput = false; DataInput foundInput = null; d.setId(task.getId() + "_" + "Comment" + "InputX"); d.setName("Comment"); task.getIoSpecification().getDataInputs().add(d); foundInput = d; if (task.getIoSpecification().getInputSets() == null || task.getIoSpecification().getInputSets().size() < 1) {
List<DataInput> taskDataInputs = subProcess.getIoSpecification().getDataInputs(); if (taskDataInputs != null) { for (DataInput din : taskDataInputs) {
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(); d.setId(targetElement.getId() + "_" + da.getId() + "InputX"); d.setName(da.getId() + "InputX"); targetElement.getIoSpecification().getDataInputs().add(d); targetElement.getIoSpecification().getInputSets().get(0).getDataInputRefs().add(d); DataInputAssociation dia = Bpmn2Factory.eINSTANCE.createDataInputAssociation();