diff --git a/application-engine/src/main/java/com/netgrif/application/engine/workflow/service/WorkflowService.java b/application-engine/src/main/java/com/netgrif/application/engine/workflow/service/WorkflowService.java index f4ade6dc8b..f4884ebc70 100644 --- a/application-engine/src/main/java/com/netgrif/application/engine/workflow/service/WorkflowService.java +++ b/application-engine/src/main/java/com/netgrif/application/engine/workflow/service/WorkflowService.java @@ -340,9 +340,9 @@ private void fillAndValidateAttributes(CreateCaseParams createCaseParams) throws } if (createCaseParams.getProcess() == null) { PetriNet petriNet; - if (createCaseParams.getProcessId() != null) { + if (createCaseParams.getProcessId() != null && !createCaseParams.getProcessId().isEmpty()) { petriNet = new com.netgrif.application.engine.adapter.spring.petrinet.domain.PetriNet((com.netgrif.application.engine.adapter.spring.petrinet.domain.PetriNet) petriNetService.get(new ObjectId(createCaseParams.getProcessId()))); - } else if (createCaseParams.getProcessIdentifier() != null) { + } else if (createCaseParams.getProcessIdentifier() != null && !createCaseParams.getProcessIdentifier().isEmpty()) { PetriNet originNet = petriNetService.getDefaultVersionByIdentifier(createCaseParams.getProcessIdentifier()); if (originNet == null) { throw new IllegalArgumentException("Could not find the process for the Case from provided inputs on case creation.");