Search in sources :

Example 21 with ValuedDataObject

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;
}
Also used : ValuedDataObject(org.activiti.bpmn.model.ValuedDataObject) ValuedDataObject(org.activiti.bpmn.model.ValuedDataObject)

Aggregations

ValuedDataObject (org.activiti.bpmn.model.ValuedDataObject)21 SubProcess (org.activiti.bpmn.model.SubProcess)14 JsonNode (com.fasterxml.jackson.databind.JsonNode)8 FlowElement (org.activiti.bpmn.model.FlowElement)8 BpmnModel (org.activiti.bpmn.model.BpmnModel)6 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)5 HashMap (java.util.HashMap)5 ExtensionElement (org.activiti.bpmn.model.ExtensionElement)5 ArrayList (java.util.ArrayList)4 BooleanDataObject (org.activiti.bpmn.model.BooleanDataObject)4 DateDataObject (org.activiti.bpmn.model.DateDataObject)4 DoubleDataObject (org.activiti.bpmn.model.DoubleDataObject)4 LongDataObject (org.activiti.bpmn.model.LongDataObject)4 StringDataObject (org.activiti.bpmn.model.StringDataObject)4 ActivitiIllegalArgumentException (org.activiti.engine.ActivitiIllegalArgumentException)4 ActivitiObjectNotFoundException (org.activiti.engine.ActivitiObjectNotFoundException)4 DataObjectImpl (org.activiti.engine.impl.DataObjectImpl)4 ExecutionEntity (org.activiti.engine.impl.persistence.entity.ExecutionEntity)4 VariableInstance (org.activiti.engine.impl.persistence.entity.VariableInstance)4 DataObject (org.activiti.engine.runtime.DataObject)4