use of org.activiti.engine.impl.bpmn.data.ClassStructureDefinition in project Activiti by Activiti.
the class BpmnParse method createItemDefinitions.
protected void createItemDefinitions() {
for (org.activiti.bpmn.model.ItemDefinition itemDefinitionElement : bpmnModel.getItemDefinitions().values()) {
StructureDefinition structure = null;
try {
// it is a class
Class<?> classStructure = ReflectUtil.loadClass(itemDefinitionElement.getStructureRef());
structure = new ClassStructureDefinition(classStructure);
} catch (ActivitiException e) {
// it is a reference to a different structure
structure = this.structures.get(itemDefinitionElement.getStructureRef());
}
ItemDefinition itemDefinition = new ItemDefinition(itemDefinitionElement.getId(), structure);
if (StringUtils.isNotEmpty(itemDefinitionElement.getItemKind())) {
itemDefinition.setItemKind(ItemKind.valueOf(itemDefinitionElement.getItemKind()));
}
itemDefinitions.put(itemDefinition.getId(), itemDefinition);
}
}
Aggregations