public void setValues(IOSpecification otherSpec) { dataInputs = new ArrayList<>(); if (otherSpec.getDataInputs() != null && !otherSpec.getDataInputs().isEmpty()) { for (DataSpec dataSpec : otherSpec.getDataInputs()) { dataInputs.add(dataSpec.clone()); } } dataOutputs = new ArrayList<>(); if (otherSpec.getDataOutputs() != null && !otherSpec.getDataOutputs().isEmpty()) { for (DataSpec dataSpec : otherSpec.getDataOutputs()) { dataOutputs.add(dataSpec.clone()); } } dataInputRefs = new ArrayList<>(otherSpec.getDataInputRefs()); dataOutputRefs = new ArrayList<>(otherSpec.getDataOutputRefs()); } }
@Override public IOSpecification clone() { IOSpecification clone = new IOSpecification(); clone.setValues(this); return clone; }
protected void initializeIoSpecification(IOSpecification activityIoSpecification, DelegateExecution execution, BpmnModel bpmnModel) { for (DataSpec dataSpec : activityIoSpecification.getDataInputs()) { ItemDefinition itemDefinition = itemDefinitionMap.get(dataSpec.getItemSubjectRef()); execution.setTransientVariable(dataSpec.getId(), itemDefinition.createInstance()); } for (DataSpec dataSpec : activityIoSpecification.getDataOutputs()) { ItemDefinition itemDefinition = itemDefinitionMap.get(dataSpec.getItemSubjectRef()); execution.setTransientVariable(dataSpec.getId(), itemDefinition.createInstance()); } }
if (ioSpecification.getDataInputRefs().size() > 0) { String firstDataInputName = ioSpecification.getDataInputRefs().get(0); ItemInstance inputItem = (ItemInstance) execution.getTransientVariable(firstDataInputName); message = new MessageInstance(operation.getInMessage(), inputItem); if (ioSpecification != null && ioSpecification.getDataOutputRefs().size() > 0) { String firstDataOutputName = ioSpecification.getDataOutputRefs().get(0); if (firstDataOutputName != null) { ItemInstance outputItem = (ItemInstance) execution.getTransientVariable(firstDataOutputName);
public void setValues(Activity otherActivity) { super.setValues(otherActivity); setFailedJobRetryTimeCycleValue(otherActivity.getFailedJobRetryTimeCycleValue()); setDefaultFlow(otherActivity.getDefaultFlow()); setForCompensation(otherActivity.isForCompensation()); if (otherActivity.getLoopCharacteristics() != null) { setLoopCharacteristics(otherActivity.getLoopCharacteristics().clone()); } if (otherActivity.getIoSpecification() != null) { setIoSpecification(otherActivity.getIoSpecification().clone()); } dataInputAssociations = new ArrayList<>(); if (otherActivity.getDataInputAssociations() != null && !otherActivity.getDataInputAssociations().isEmpty()) { for (DataAssociation association : otherActivity.getDataInputAssociations()) { dataInputAssociations.add(association.clone()); } } dataOutputAssociations = new ArrayList<>(); if (otherActivity.getDataOutputAssociations() != null && !otherActivity.getDataOutputAssociations().isEmpty()) { for (DataAssociation association : otherActivity.getDataOutputAssociations()) { dataOutputAssociations.add(association.clone()); } } boundaryEvents.clear(); boundaryEvents.addAll(otherActivity.getBoundaryEvents()); } }
public void setValues(Activity otherActivity) { super.setValues(otherActivity); setFailedJobRetryTimeCycleValue(otherActivity.getFailedJobRetryTimeCycleValue()); setDefaultFlow(otherActivity.getDefaultFlow()); setForCompensation(otherActivity.isForCompensation()); if (otherActivity.getLoopCharacteristics() != null) { setLoopCharacteristics(otherActivity.getLoopCharacteristics().clone()); } if (otherActivity.getIoSpecification() != null) { setIoSpecification(otherActivity.getIoSpecification().clone()); } dataInputAssociations = new ArrayList<>(); if (otherActivity.getDataInputAssociations() != null && !otherActivity.getDataInputAssociations().isEmpty()) { for (DataAssociation association : otherActivity.getDataInputAssociations()) { dataInputAssociations.add(association.clone()); } } dataOutputAssociations = new ArrayList<>(); if (otherActivity.getDataOutputAssociations() != null && !otherActivity.getDataOutputAssociations().isEmpty()) { for (DataAssociation association : otherActivity.getDataOutputAssociations()) { dataOutputAssociations.add(association.clone()); } } boundaryEvents.clear(); boundaryEvents.addAll(otherActivity.getBoundaryEvents()); } }
public void setValues(IOSpecification otherSpec) { dataInputs = new ArrayList<>(); if (otherSpec.getDataInputs() != null && !otherSpec.getDataInputs().isEmpty()) { for (DataSpec dataSpec : otherSpec.getDataInputs()) { dataInputs.add(dataSpec.clone()); } } dataOutputs = new ArrayList<>(); if (otherSpec.getDataOutputs() != null && !otherSpec.getDataOutputs().isEmpty()) { for (DataSpec dataSpec : otherSpec.getDataOutputs()) { dataOutputs.add(dataSpec.clone()); } } dataInputRefs = new ArrayList<>(otherSpec.getDataInputRefs()); dataOutputRefs = new ArrayList<>(otherSpec.getDataOutputRefs()); } }
@Override public IOSpecification clone() { IOSpecification clone = new IOSpecification(); clone.setValues(this); return clone; }
setDocumentation(otherElement.getDocumentation()); if (otherElement.getIoSpecification() != null) { setIoSpecification(otherElement.getIoSpecification().clone());
return; IOSpecification ioSpecification = new IOSpecification(); BpmnXMLUtil.addXMLLocation(ioSpecification, xtr); boolean readyWithIOSpecification = false; dataSpec.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME)); dataSpec.setItemSubjectRef(parseItemSubjectRef(xtr.getAttributeValue(null, ATTRIBUTE_ITEM_SUBJECT_REF), model)); ioSpecification.getDataInputs().add(dataSpec); dataSpec.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME)); dataSpec.setItemSubjectRef(parseItemSubjectRef(xtr.getAttributeValue(null, ATTRIBUTE_ITEM_SUBJECT_REF), model)); ioSpecification.getDataOutputs().add(dataSpec); ioSpecification.getDataInputRefs().add(dataInputRefs.trim()); String dataOutputRefs = xtr.getElementText(); if (StringUtils.isNotEmpty(dataOutputRefs)) { ioSpecification.getDataOutputRefs().add(dataOutputRefs.trim());
setDocumentation(otherElement.getDocumentation()); if (otherElement.getIoSpecification() != null) { setIoSpecification(otherElement.getIoSpecification().clone());
protected IOSpecification createIOSpecification(BpmnParse bpmnParse, org.flowable.bpmn.model.IOSpecification specificationModel) { IOSpecification ioSpecification = new IOSpecification(); for (DataSpec dataInputElement : specificationModel.getDataInputs()) { ItemDefinition itemDefinition = bpmnParse.getItemDefinitions().get(dataInputElement.getItemSubjectRef()); Data dataInput = new Data(bpmnParse.getTargetNamespace() + ":" + dataInputElement.getId(), dataInputElement.getId(), itemDefinition); ioSpecification.addInput(dataInput); } for (DataSpec dataOutputElement : specificationModel.getDataOutputs()) { ItemDefinition itemDefinition = bpmnParse.getItemDefinitions().get(dataOutputElement.getItemSubjectRef()); Data dataOutput = new Data(bpmnParse.getTargetNamespace() + ":" + dataOutputElement.getId(), dataOutputElement.getId(), itemDefinition); ioSpecification.addOutput(dataOutput); } for (String dataInputRef : specificationModel.getDataInputRefs()) { DataRef dataRef = new DataRef(dataInputRef); ioSpecification.addInputRef(dataRef); } for (String dataOutputRef : specificationModel.getDataOutputRefs()) { DataRef dataRef = new DataRef(dataOutputRef); ioSpecification.addOutputRef(dataRef); } return ioSpecification; }