public static String getProcessVariableName(Property p) { String name = p.getName(); // legacy uses ID instead of name return name == null? p.getId() : name; }
private static String getCaseFileVariableName(Property p) { String name = p.getName(); // legacy uses ID instead of name return name == null ? p.getId() : name; }
private static String getPropertyName(Property prop) { return prop.getName() == null ? prop.getId() : prop.getName(); } }
private static String getPropertyName(Property prop) { return prop.getName() == null ? prop.getId() : prop.getName(); }
private Set<DataHolder> getProcessDataHolders( List<Property> processProperties, String path ) { Set<DataHolder> result = new TreeSet<DataHolder>(); String[] colors = dataHolderManager.getHolderColors().keySet().toArray( new String[0] ); int index = 0; for ( Property prop : processProperties ) { String propertyName = prop.getId(); String propertyType = StringUtils.defaultIfEmpty( prop.getItemSubjectRef().getStructureRef(), "java.lang.Object" ); DataHolderBuildConfig config = new DataHolderBuildConfig( propertyName, "", propertyName, colors[index], propertyType ); config.addAttribute( "path", path ); DataHolder dataHolder = createDataHolder( config ); if ( dataHolder != null ) result.add( dataHolder ); if ( index == colors.length - 1 ) index = 0; else index++; } return result; }
@Before public void setup() { properties = new ArrayList<>(); properties.add(property1); properties.add(property2); properties.add(property3); properties.add(property4); when(property1.getName()).thenReturn(CaseFileVariables.CASE_FILE_PREFIX + "CFV1"); when(property1.getId()).thenReturn(CaseFileVariables.CASE_FILE_PREFIX + "CFV1"); when(property1.getItemSubjectRef()).thenReturn(definition); when(property2.getName()).thenReturn(null); when(property2.getId()).thenReturn(CaseFileVariables.CASE_FILE_PREFIX + "CFV2"); when(property2.getItemSubjectRef()).thenReturn(definition); when(definition.getStructureRef()).thenReturn("Boolean"); when(property3.getName()).thenReturn("PV1"); when(property3.getId()).thenReturn("PV1"); when(property4.getName()).thenReturn(null); when(property4.getId()).thenReturn("PV2"); }
private Property getProcessProperty(List<Property> properties, String id, String itemSubjectRef) { for (Property property : properties) { if (id.equals(property.getId())) { if (itemSubjectRef.equals(property.getItemSubjectRef().getId())) { return property; } else { return null; } } } return null; }
String holderClass = StringUtils.defaultIfEmpty( prop.getItemSubjectRef().getStructureRef(), "java.lang.Object" ); DataHolderBuildConfig config = new DataHolderBuildConfig( prop.getId(), "", "", holderClass ); config.addAttribute( "path", contextUri ); associations.put( prop.getId(), config ); if ( index == colors.length - 1 ) index = 0; else index++;
private Property getProcessProperty(List<Property> properties, String id, String itemSubjectRef) { for (Property property : properties) { if (id.equals(property.getId()) || id.equals(property.getName())) { if (itemSubjectRef.equals(property.getItemSubjectRef().getId())) { return property; } else { return null; } } } return null; }
@Override public BusinessProcessFormModel generateProcessFormModel(Definitions source, Path path) { Process process = getProcess(source); if (process != null) { final ClassLoader projectClassLoader = projectClassLoaderHelper.getModuleClassLoader(moduleService.resolveModule(path)); List<ModelProperty> properties = process.getProperties().stream().map(property -> { String varName = property.getId(); String varType = BPMNVariableUtils.getRealTypeForInput(property.getItemSubjectRef().getStructureRef()); Variable variable = new Variable(varName, varType); variable.setInput(true); variable.setOutput(true); return createModelProperty(variable, projectClassLoader); }).filter(modelProperty -> modelProperty != null) .sorted((property1, property2) -> property1.getName().compareToIgnoreCase(property2.getName())).collect(Collectors.toList()); return new BusinessProcessFormModel(process.getId(), process.getName(), properties); } return null; }
String[] vardefParts = vardef.split(":\\s*"); prop.setId(vardefParts[0]); itemdef.setId("_" + prop.getId() + "Item"); boolean haveKPI = false; String kpiValue = ""; itemdef.setId("_" + prop.getId() + "Item"); String[] vardefParts = vardef.split(":\\s*"); prop.setId(vardefParts[0]); itemdef.setId("_" + prop.getId() + "Item"); boolean haveKPI = false; String kpiValue = ""; itemdef.setId("_" + prop.getId() + "Item");
String pKPI = Utils.getMetaDataValue(p.getExtensionValues(), "customKPI"); propVal += p.getId();
List<Property> properties = process.getProperties(); for (Property prop : properties) { if (prop.getId() != null && prop.getId().equals(miCollectionInput)) { DataInput miCollectionInputDI = Bpmn2Factory.eINSTANCE.createDataInput(); miCollectionInputDI.setName("miinputCollection"); ItemDefinition miCollectionInputDIItemDefinition = this.getMessageItemDefinition(def.getRootElements(), prop.getId()); miCollectionInputDI.setItemSubjectRef(miCollectionInputDIItemDefinition); task.getIoSpecification().getDataInputs().add(miCollectionInputDI); List<Property> properties = process.getProperties(); for (Property prop : properties) { if (prop.getId() != null && prop.getId().equals(miCollectionOutput)) { DataOutput miCollectionOutputDI = Bpmn2Factory.eINSTANCE.createDataOutput(); miCollectionOutputDI.setName("mioutputCollection"); ItemDefinition miCollectionOutputDIItemDefinition = this.getMessageItemDefinition(def.getRootElements(), prop.getId()); miCollectionOutputDI.setItemSubjectRef(miCollectionOutputDIItemDefinition); task.getIoSpecification().getDataOutputs().add(miCollectionOutputDI);
String pKPI = Utils.getMetaDataValue(p.getExtensionValues(), "customKPI"); propVal += p.getId();