Ejemplo n.º 1
0
        public virtual void close(CaseExecutionTriggerDto triggerDto)
        {
            try
            {
                CaseService caseService = engine.CaseService;
                CaseExecutionCommandBuilder commandBuilder = caseService.withCaseExecution(caseInstanceId);

                initializeCommand(commandBuilder, triggerDto, "close");

                commandBuilder.close();
            }
            catch (NotFoundException e)
            {
                throw createInvalidRequestException("close", Status.NOT_FOUND, e);
            }
            catch (NotValidException e)
            {
                throw createInvalidRequestException("close", Status.BAD_REQUEST, e);
            }
            catch (NotAllowedException e)
            {
                throw createInvalidRequestException("close", Status.FORBIDDEN, e);
            }
            catch (ProcessEngineException e)
            {
                throw createRestException("close", Status.INTERNAL_SERVER_ERROR, e);
            }
        }