use of org.activiti.bpmn.model.ValuedDataObject in project CzechIdMng by bcvsolutions.
the class DefaultDelegationManager method getProcessDelegationType.
@Override
public String getProcessDelegationType(String definitionId) {
Assert.notNull(definitionId, "Workflow definition ID cannot be null!");
List<ValuedDataObject> dataObjects = processDefinitionService.getDataObjects(definitionId);
if (dataObjects != null) {
ValuedDataObject supportVariable = dataObjects.stream().filter(dataObject -> WORKFLOW_DELEGATION_TYPE_KEY.equals(dataObject.getName())).findFirst().orElse(null);
if (supportVariable != null) {
Object value = supportVariable.getValue();
if (value instanceof String) {
return (String) value;
}
}
}
return null;
}
Aggregations