diff --git a/modules/flowable-bpmn-model/src/main/java/org/flowable/bpmn/model/FlowElementsContainer.java b/modules/flowable-bpmn-model/src/main/java/org/flowable/bpmn/model/FlowElementsContainer.java index 2890b69bcc3..657225fe14c 100644 --- a/modules/flowable-bpmn-model/src/main/java/org/flowable/bpmn/model/FlowElementsContainer.java +++ b/modules/flowable-bpmn-model/src/main/java/org/flowable/bpmn/model/FlowElementsContainer.java @@ -20,6 +20,10 @@ */ public interface FlowElementsContainer { + + //Custom PROTOOLS: + FlowElement getFlowElement(String flowElementId, boolean searchRecursive); + FlowElement getFlowElement(String id); Collection getFlowElements(); diff --git a/modules/flowable-bpmn-model/src/main/java/org/flowable/bpmn/model/SubProcess.java b/modules/flowable-bpmn-model/src/main/java/org/flowable/bpmn/model/SubProcess.java index ee02cd8eea8..c83de3d5c3e 100644 --- a/modules/flowable-bpmn-model/src/main/java/org/flowable/bpmn/model/SubProcess.java +++ b/modules/flowable-bpmn-model/src/main/java/org/flowable/bpmn/model/SubProcess.java @@ -33,6 +33,26 @@ public class SubProcess extends Activity implements FlowElementsContainer { protected List artifactList = new ArrayList<>(); protected List dataObjects = new ArrayList<>(); + + //Custom PROTOOLS: + @Override + public FlowElement getFlowElement(String flowElementId, boolean searchRecursive) { + if (searchRecursive) { + return flowElementMap.get(flowElementId); + } else { + return findFlowElementInList(flowElementId); + } + } + protected FlowElement findFlowElementInList(String flowElementId) { + for (FlowElement f : flowElementList) { + if (f.getId() != null && f.getId().equals(flowElementId)) { + return f; + } + } + return null; + } + //END CUSTOM + @Override public FlowElement getFlowElement(String id) { FlowElement foundElement = null; diff --git a/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/helper/ErrorPropagation.java b/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/helper/ErrorPropagation.java index fb446a0549c..9f0096335ae 100644 --- a/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/helper/ErrorPropagation.java +++ b/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/helper/ErrorPropagation.java @@ -161,7 +161,7 @@ protected static void executeCatch(Map> eventMap, DelegateEx String refActivityId = refId.substring(0, refId.indexOf('#')); String refProcessDefinitionId = refId.substring(refId.indexOf('#') + 1); if (parentExecution.getProcessDefinitionId().equals(refProcessDefinitionId) && - currentContainer.getFlowElement(refActivityId) != null) { + currentContainer.getFlowElement(refActivityId, false) != null) { matchingEvent = getCatchEventFromList(events, parentExecution); String errorCode = getErrorCodeFromErrorEventDefinition(matchingEvent); diff --git a/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/DeploymentResourceResource.java b/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/DeploymentResourceResource.java index 7e75639cea2..3448c1a2458 100644 --- a/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/DeploymentResourceResource.java +++ b/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/DeploymentResourceResource.java @@ -83,8 +83,8 @@ public DeploymentResourceResponse getDeploymentResource(@ApiParam(name = "deploy restApiInterceptor.accessDeploymentById(deployment); } - String pathInfo = request.getPathInfo(); - String resourceName = pathInfo.replace("/repository/deployments/" + deploymentId + "/resources/", ""); + String ressourceURI = request.getRequestURI(); + String resourceName = ressourceURI.replace(request.getContextPath()+"/repository/deployments/" + deploymentId + "/resources/", ""); List resourceList = repositoryService.getDeploymentResourceNames(deploymentId);