Class BpmEngineBase

  • All Implemented Interfaces:
    es.caib.bpm.servei.BpmEngine

    public abstract class BpmEngineBase
    extends Object
    implements es.caib.bpm.servei.BpmEngine

    Spring Service base class for es.caib.bpm.servei.BpmEngine, provides access to all services and entities referenced by this service.

    see es.caib.bpm.servei.BpmEngine
    • Constructor Detail

      • BpmEngineBase

        public BpmEngineBase()
    • Method Detail

      • setBpmEngine

        public void setBpmEngine​(com.soffid.iam.bpm.service.BpmEngine bpmEngine)
        Sets reference to bpmEngine.
      • getBpmEngine

        public com.soffid.iam.bpm.service.BpmEngine getBpmEngine()
        Gets reference to bpmEngine.
      • canAdmin

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public boolean canAdmin​(es.caib.bpm.vo.ProcessInstance instanceVO)
                         throws es.caib.seycon.ng.exception.InternalErrorException,
                                es.caib.seycon.ng.exception.InternalErrorException,
                                es.caib.bpm.exception.BPMException
        Specified by:
        canAdmin in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleCanAdmin

        protected abstract boolean handleCanAdmin​(es.caib.bpm.vo.ProcessInstance instanceVO)
                                           throws Exception
        Throws:
        Exception
      • isUserInRole

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class,
                       readOnly=true)
        public boolean isUserInRole​(String role)
                             throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        isUserInRole in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleIsUserInRole

        protected abstract boolean handleIsUserInRole​(String role)
                                               throws Exception
        Throws:
        Exception
      • getProcessDefinitionIcon

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public byte[] getProcessDefinitionIcon​(Long definitionId)
                                        throws es.caib.seycon.ng.exception.InternalErrorException,
                                               es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getProcessDefinitionIcon in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetProcessDefinitionIcon

        protected abstract byte[] handleGetProcessDefinitionIcon​(Long definitionId)
                                                          throws Exception
        Throws:
        Exception
      • getProcessDefinitionImage

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public byte[] getProcessDefinitionImage​(es.caib.bpm.vo.ProcessDefinition def)
                                         throws es.caib.seycon.ng.exception.InternalErrorException,
                                                es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getProcessDefinitionImage in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetProcessDefinitionImage

        protected abstract byte[] handleGetProcessDefinitionImage​(es.caib.bpm.vo.ProcessDefinition def)
                                                           throws Exception
        Throws:
        Exception
      • findProcessDefinitionByTextAndJsonQuery

        @Transactional(rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.PagedResult<es.caib.bpm.vo.ProcessDefinition> findProcessDefinitionByTextAndJsonQuery​(String text,
                                                                                                                        String jsonQuery,
                                                                                                                        Integer start,
                                                                                                                        Integer pageSize)
                                                                                                                 throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findProcessDefinitionByTextAndJsonQuery in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindProcessDefinitionByTextAndJsonQuery

        protected abstract com.soffid.iam.api.PagedResult<es.caib.bpm.vo.ProcessDefinition> handleFindProcessDefinitionByTextAndJsonQuery​(String text,
                                                                                                                                          String jsonQuery,
                                                                                                                                          Integer start,
                                                                                                                                          Integer pageSize)
                                                                                                                                   throws Exception
        Throws:
        Exception
      • findProcessInstanceByTextAndJsonQuery

        @Transactional(rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.PagedResult<es.caib.bpm.vo.ProcessInstance> findProcessInstanceByTextAndJsonQuery​(String text,
                                                                                                                    String jsonQuery,
                                                                                                                    Integer start,
                                                                                                                    Integer pageSize)
                                                                                                             throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findProcessInstanceByTextAndJsonQuery in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindProcessInstanceByTextAndJsonQuery

        protected abstract com.soffid.iam.api.PagedResult<es.caib.bpm.vo.ProcessInstance> handleFindProcessInstanceByTextAndJsonQuery​(String text,
                                                                                                                                      String jsonQuery,
                                                                                                                                      Integer start,
                                                                                                                                      Integer pageSize)
                                                                                                                               throws Exception
        Throws:
        Exception
      • findTasksByTextAndJsonQuery

        @Transactional(rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.PagedResult<es.caib.bpm.vo.TaskInstance> findTasksByTextAndJsonQuery​(String text,
                                                                                                       String jsonQuery,
                                                                                                       Integer start,
                                                                                                       Integer pageSize)
                                                                                                throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findTasksByTextAndJsonQuery in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindTasksByTextAndJsonQuery

        protected abstract com.soffid.iam.api.PagedResult<es.caib.bpm.vo.TaskInstance> handleFindTasksByTextAndJsonQuery​(String text,
                                                                                                                         String jsonQuery,
                                                                                                                         Integer start,
                                                                                                                         Integer pageSize)
                                                                                                                  throws Exception
        Throws:
        Exception
      • disableProcessDefinition

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.ProcessDefinition disableProcessDefinition​(es.caib.bpm.vo.ProcessDefinition defVO)
                                                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                         es.caib.seycon.ng.exception.InternalErrorException,
                                                                         es.caib.bpm.exception.BPMException
        Specified by:
        disableProcessDefinition in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleDisableProcessDefinition

        protected abstract es.caib.bpm.vo.ProcessDefinition handleDisableProcessDefinition​(es.caib.bpm.vo.ProcessDefinition defVO)
                                                                                    throws Exception
        Throws:
        Exception
      • enableProcessDefinition

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.ProcessDefinition enableProcessDefinition​(es.caib.bpm.vo.ProcessDefinition defVO)
                                                                 throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                        es.caib.seycon.ng.exception.InternalErrorException,
                                                                        es.caib.bpm.exception.BPMException
        Specified by:
        enableProcessDefinition in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleEnableProcessDefinition

        protected abstract es.caib.bpm.vo.ProcessDefinition handleEnableProcessDefinition​(es.caib.bpm.vo.ProcessDefinition defVO)
                                                                                   throws Exception
        Throws:
        Exception
      • getDefinition

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.ProcessDefinition getDefinition​(es.caib.bpm.vo.ProcessInstance process)
                                                       throws es.caib.seycon.ng.exception.InternalErrorException,
                                                              es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getDefinition in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetDefinition

        protected abstract es.caib.bpm.vo.ProcessDefinition handleGetDefinition​(es.caib.bpm.vo.ProcessInstance process)
                                                                         throws Exception
        Throws:
        Exception
      • getProcessDefinition

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.ProcessDefinition getProcessDefinition​(es.caib.bpm.vo.ProcessInstance process)
                                                              throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                     es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getProcessDefinition in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetProcessDefinition

        protected abstract es.caib.bpm.vo.ProcessDefinition handleGetProcessDefinition​(es.caib.bpm.vo.ProcessInstance process)
                                                                                throws Exception
        Throws:
        Exception
      • cancel

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.ProcessInstance cancel​(es.caib.bpm.vo.ProcessInstance process)
                                              throws es.caib.seycon.ng.exception.InternalErrorException,
                                                     es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        cancel in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleCancel

        protected abstract es.caib.bpm.vo.ProcessInstance handleCancel​(es.caib.bpm.vo.ProcessInstance process)
                                                                throws Exception
        Throws:
        Exception
      • getProcess

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       noRollbackFor=java.lang.Exception.class,
                       readOnly=true)
        public es.caib.bpm.vo.ProcessInstance getProcess​(long id)
                                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                                         es.caib.seycon.ng.exception.InternalErrorException,
                                                         es.caib.bpm.exception.BPMException
        Specified by:
        getProcess in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleGetProcess

        protected abstract es.caib.bpm.vo.ProcessInstance handleGetProcess​(long id)
                                                                    throws Exception
        Throws:
        Exception
      • getProcessInstance

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       noRollbackFor=java.lang.Exception.class,
                       readOnly=true)
        public es.caib.bpm.vo.ProcessInstance getProcessInstance​(es.caib.bpm.vo.TaskInstance task)
                                                          throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                 es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getProcessInstance in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetProcessInstance

        protected abstract es.caib.bpm.vo.ProcessInstance handleGetProcessInstance​(es.caib.bpm.vo.TaskInstance task)
                                                                            throws Exception
        Throws:
        Exception
      • getProcessLightweight

        @Transactional(rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.ProcessInstance getProcessLightweight​(long id)
                                                             throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                    es.caib.seycon.ng.exception.InternalErrorException,
                                                                    es.caib.bpm.exception.BPMException
        Specified by:
        getProcessLightweight in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleGetProcessLightweight

        protected abstract es.caib.bpm.vo.ProcessInstance handleGetProcessLightweight​(long id)
                                                                               throws Exception
        Throws:
        Exception
      • newProcess

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.ProcessInstance newProcess​(es.caib.bpm.vo.ProcessDefinition def)
                                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                                         es.caib.seycon.ng.exception.InternalErrorException,
                                                         es.caib.bpm.exception.BPMException
        Specified by:
        newProcess in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleNewProcess

        protected abstract es.caib.bpm.vo.ProcessInstance handleNewProcess​(es.caib.bpm.vo.ProcessDefinition def)
                                                                    throws Exception
        Throws:
        Exception
      • newProcess

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.ProcessInstance newProcess​(es.caib.bpm.vo.ProcessDefinition def,
                                                         boolean start)
                                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                                         es.caib.seycon.ng.exception.InternalErrorException,
                                                         es.caib.bpm.exception.BPMException
        Specified by:
        newProcess in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleNewProcess

        protected abstract es.caib.bpm.vo.ProcessInstance handleNewProcess​(es.caib.bpm.vo.ProcessDefinition def,
                                                                           boolean start)
                                                                    throws Exception
        Throws:
        Exception
      • getProcessLog

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.ProcessLog[] getProcessLog​(es.caib.bpm.vo.ProcessInstance process)
                                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                                         es.caib.seycon.ng.exception.InternalErrorException,
                                                         es.caib.bpm.exception.BPMException
        Specified by:
        getProcessLog in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleGetProcessLog

        protected abstract es.caib.bpm.vo.ProcessLog[] handleGetProcessLog​(es.caib.bpm.vo.ProcessInstance process)
                                                                    throws Exception
        Throws:
        Exception
      • getTaskLog

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.ProcessLog[] getTaskLog​(es.caib.bpm.vo.TaskInstance process)
                                               throws es.caib.seycon.ng.exception.InternalErrorException,
                                                      es.caib.seycon.ng.exception.InternalErrorException,
                                                      es.caib.bpm.exception.BPMException
        Specified by:
        getTaskLog in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleGetTaskLog

        protected abstract es.caib.bpm.vo.ProcessLog[] handleGetTaskLog​(es.caib.bpm.vo.TaskInstance process)
                                                                 throws Exception
        Throws:
        Exception
      • getDefinition

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.TaskDefinition getDefinition​(es.caib.bpm.vo.TaskInstance task)
                                                    throws es.caib.seycon.ng.exception.InternalErrorException,
                                                           es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getDefinition in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetDefinition

        protected abstract es.caib.bpm.vo.TaskDefinition handleGetDefinition​(es.caib.bpm.vo.TaskInstance task)
                                                                      throws Exception
        Throws:
        Exception
      • addComment

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.TaskInstance addComment​(es.caib.bpm.vo.TaskInstance task,
                                                      String comment)
                                               throws es.caib.seycon.ng.exception.InternalErrorException,
                                                      es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        addComment in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleAddComment

        protected abstract es.caib.bpm.vo.TaskInstance handleAddComment​(es.caib.bpm.vo.TaskInstance task,
                                                                        String comment)
                                                                 throws Exception
        Throws:
        Exception
      • cancel

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.TaskInstance cancel​(es.caib.bpm.vo.TaskInstance task)
                                           throws es.caib.seycon.ng.exception.InternalErrorException,
                                                  es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        cancel in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleCancel

        protected abstract es.caib.bpm.vo.TaskInstance handleCancel​(es.caib.bpm.vo.TaskInstance task)
                                                             throws Exception
        Throws:
        Exception
      • createDummyTask

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.TaskInstance createDummyTask​(long processDefinitionId)
                                                    throws es.caib.seycon.ng.exception.InternalErrorException,
                                                           es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        createDummyTask in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleCreateDummyTask

        protected abstract es.caib.bpm.vo.TaskInstance handleCreateDummyTask​(long processDefinitionId)
                                                                      throws Exception
        Throws:
        Exception
      • delegateTaskToUser

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.TaskInstance delegateTaskToUser​(es.caib.bpm.vo.TaskInstance task,
                                                              String username)
                                                       throws es.caib.seycon.ng.exception.InternalErrorException,
                                                              es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        delegateTaskToUser in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleDelegateTaskToUser

        protected abstract es.caib.bpm.vo.TaskInstance handleDelegateTaskToUser​(es.caib.bpm.vo.TaskInstance task,
                                                                                String username)
                                                                         throws Exception
        Throws:
        Exception
      • executeTask

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.TaskInstance executeTask​(es.caib.bpm.vo.TaskInstance task,
                                                       String transitionName)
                                                throws es.caib.seycon.ng.exception.InternalErrorException,
                                                       es.caib.seycon.ng.exception.InternalErrorException,
                                                       es.caib.bpm.exception.BPMException
        Specified by:
        executeTask in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleExecuteTask

        protected abstract es.caib.bpm.vo.TaskInstance handleExecuteTask​(es.caib.bpm.vo.TaskInstance task,
                                                                         String transitionName)
                                                                  throws Exception
        Throws:
        Exception
      • getTask

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       noRollbackFor=java.lang.Exception.class,
                       readOnly=true)
        public es.caib.bpm.vo.TaskInstance getTask​(long id)
                                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                                   es.caib.seycon.ng.exception.InternalErrorException,
                                                   es.caib.bpm.exception.BPMException
        Specified by:
        getTask in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleGetTask

        protected abstract es.caib.bpm.vo.TaskInstance handleGetTask​(long id)
                                                              throws Exception
        Throws:
        Exception
      • reserveTask

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.TaskInstance reserveTask​(es.caib.bpm.vo.TaskInstance task)
                                                throws es.caib.seycon.ng.exception.InternalErrorException,
                                                       es.caib.seycon.ng.exception.InternalErrorException,
                                                       es.caib.bpm.exception.BPMException
        Specified by:
        reserveTask in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleReserveTask

        protected abstract es.caib.bpm.vo.TaskInstance handleReserveTask​(es.caib.bpm.vo.TaskInstance task)
                                                                  throws Exception
        Throws:
        Exception
      • startTask

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.TaskInstance startTask​(es.caib.bpm.vo.TaskInstance task)
                                              throws es.caib.seycon.ng.exception.InternalErrorException,
                                                     es.caib.seycon.ng.exception.InternalErrorException,
                                                     es.caib.bpm.exception.BPMException
        Specified by:
        startTask in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleStartTask

        protected abstract es.caib.bpm.vo.TaskInstance handleStartTask​(es.caib.bpm.vo.TaskInstance task)
                                                                throws Exception
        Throws:
        Exception
      • update

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.TaskInstance update​(es.caib.bpm.vo.TaskInstance task)
                                           throws es.caib.seycon.ng.exception.InternalErrorException,
                                                  es.caib.seycon.ng.exception.InternalErrorException,
                                                  es.caib.bpm.exception.BPMException
        Specified by:
        update in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleUpdate

        protected abstract es.caib.bpm.vo.TaskInstance handleUpdate​(es.caib.bpm.vo.TaskInstance task)
                                                             throws Exception
        Throws:
        Exception
      • getTokens

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.bpm.vo.Token[] getTokens​(long id)
                                         throws es.caib.seycon.ng.exception.InternalErrorException,
                                                es.caib.seycon.ng.exception.InternalErrorException,
                                                es.caib.bpm.exception.BPMException
        Specified by:
        getTokens in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleGetTokens

        protected abstract es.caib.bpm.vo.Token[] handleGetTokens​(long id)
                                                           throws Exception
        Throws:
        Exception
      • countMyTasks

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public int countMyTasks()
                         throws es.caib.seycon.ng.exception.InternalErrorException,
                                es.caib.seycon.ng.exception.InternalErrorException,
                                es.caib.bpm.exception.BPMException
        Specified by:
        countMyTasks in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleCountMyTasks

        protected abstract int handleCountMyTasks()
                                           throws Exception
        Throws:
        Exception
      • countNewTasks

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public int countNewTasks()
                          throws es.caib.seycon.ng.exception.InternalErrorException,
                                 es.caib.seycon.ng.exception.InternalErrorException,
                                 es.caib.bpm.exception.BPMException
        Specified by:
        countNewTasks in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleCountNewTasks

        protected abstract int handleCountNewTasks()
                                            throws Exception
        Throws:
        Exception
      • getCoordinates

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public int[] getCoordinates​(es.caib.bpm.vo.ProcessInstance task)
                             throws es.caib.seycon.ng.exception.InternalErrorException,
                                    es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getCoordinates in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetCoordinates

        protected abstract int[] handleGetCoordinates​(es.caib.bpm.vo.ProcessInstance task)
                                               throws Exception
        Throws:
        Exception
      • getCoordinates

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public int[] getCoordinates​(es.caib.bpm.vo.TaskInstance task)
                             throws es.caib.seycon.ng.exception.InternalErrorException,
                                    es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getCoordinates in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetCoordinates

        protected abstract int[] handleGetCoordinates​(es.caib.bpm.vo.TaskInstance task)
                                               throws Exception
        Throws:
        Exception
      • getResourceAsStream

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public InputStream getResourceAsStream​(es.caib.bpm.vo.ProcessDefinition processdef,
                                               String resource)
                                        throws es.caib.seycon.ng.exception.InternalErrorException,
                                               es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getResourceAsStream in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetResourceAsStream

        protected abstract InputStream handleGetResourceAsStream​(es.caib.bpm.vo.ProcessDefinition processdef,
                                                                 String resource)
                                                          throws Exception
        Throws:
        Exception
      • getResourceAsStream

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public InputStream getResourceAsStream​(es.caib.bpm.vo.ProcessInstance process,
                                               String resource)
                                        throws es.caib.seycon.ng.exception.InternalErrorException,
                                               es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getResourceAsStream in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetResourceAsStream

        protected abstract InputStream handleGetResourceAsStream​(es.caib.bpm.vo.ProcessInstance process,
                                                                 String resource)
                                                          throws Exception
        Throws:
        Exception
      • getUI

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public String getUI​(es.caib.bpm.vo.ProcessInstance process)
                     throws es.caib.seycon.ng.exception.InternalErrorException,
                            es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getUI in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetUI

        protected abstract String handleGetUI​(es.caib.bpm.vo.ProcessInstance process)
                                       throws Exception
        Throws:
        Exception
      • getUI

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public String getUI​(es.caib.bpm.vo.TaskInstance task)
                     throws es.caib.seycon.ng.exception.InternalErrorException,
                            es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getUI in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetUI

        protected abstract String handleGetUI​(es.caib.bpm.vo.TaskInstance task)
                                       throws Exception
        Throws:
        Exception
      • getDeployMessages

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public String[] getDeployMessages()
                                   throws es.caib.seycon.ng.exception.InternalErrorException,
                                          es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getDeployMessages in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • findChildProcesses

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class,
                       readOnly=true)
        public Collection<Long> findChildProcesses​(Long processId)
                                            throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findChildProcesses in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • findParentProceeses

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class,
                       readOnly=true)
        public Collection<Long> findParentProceeses​(Long processId)
                                             throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findParentProceeses in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • findUsers

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<es.caib.bpm.vo.BPMUser> findUsers​(String userName,
                                                            String givenName,
                                                            String surName,
                                                            String group)
                                                     throws es.caib.seycon.ng.exception.InternalErrorException,
                                                            es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findUsers in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • findAllProcessDefinitions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.ProcessDefinition> findAllProcessDefinitions​(boolean onlyEnabled)
                                                                         throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                                es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findAllProcessDefinitions in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindAllProcessDefinitions

        protected abstract List<es.caib.bpm.vo.ProcessDefinition> handleFindAllProcessDefinitions​(boolean onlyEnabled)
                                                                                           throws Exception
        Throws:
        Exception
      • findGroupTasks

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.TaskInstance> findGroupTasks()
                                                         throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                es.caib.seycon.ng.exception.InternalErrorException,
                                                                es.caib.bpm.exception.BPMException
        Specified by:
        findGroupTasks in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleFindGroupTasks

        protected abstract List<es.caib.bpm.vo.TaskInstance> handleFindGroupTasks()
                                                                           throws Exception
        Throws:
        Exception
      • findInitiatorProcessDefinitions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.ProcessDefinition> findInitiatorProcessDefinitions()
                                                                               throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                                      es.caib.seycon.ng.exception.InternalErrorException,
                                                                                      es.caib.bpm.exception.BPMException
        Specified by:
        findInitiatorProcessDefinitions in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleFindInitiatorProcessDefinitions

        protected abstract List<es.caib.bpm.vo.ProcessDefinition> handleFindInitiatorProcessDefinitions()
                                                                                                 throws Exception
        Throws:
        Exception
      • findMyProcesses

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.ProcessInstance> findMyProcesses()
                                                             throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                    es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findMyProcesses in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindMyProcesses

        protected abstract List<es.caib.bpm.vo.ProcessInstance> handleFindMyProcesses()
                                                                               throws Exception
        Throws:
        Exception
      • findMyTasks

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.TaskInstance> findMyTasks()
                                                      throws es.caib.seycon.ng.exception.InternalErrorException,
                                                             es.caib.seycon.ng.exception.InternalErrorException,
                                                             es.caib.bpm.exception.BPMException
        Specified by:
        findMyTasks in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleFindMyTasks

        protected abstract List<es.caib.bpm.vo.TaskInstance> handleFindMyTasks()
                                                                        throws Exception
        Throws:
        Exception
      • findMyTasksLightweight

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.TaskInstance> findMyTasksLightweight()
                                                                 throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                        es.caib.seycon.ng.exception.InternalErrorException,
                                                                        es.caib.bpm.exception.BPMException
        Specified by:
        findMyTasksLightweight in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleFindMyTasksLightweight

        protected abstract List<es.caib.bpm.vo.TaskInstance> handleFindMyTasksLightweight()
                                                                                   throws Exception
        Throws:
        Exception
      • findObserverProcessDefinitions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.ProcessDefinition> findObserverProcessDefinitions()
                                                                              throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                                     es.caib.seycon.ng.exception.InternalErrorException,
                                                                                     es.caib.bpm.exception.BPMException
        Specified by:
        findObserverProcessDefinitions in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleFindObserverProcessDefinitions

        protected abstract List<es.caib.bpm.vo.ProcessDefinition> handleFindObserverProcessDefinitions()
                                                                                                throws Exception
        Throws:
        Exception
      • findProcessDefinitions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.ProcessDefinition> findProcessDefinitions​(String name,
                                                                             boolean onlyEnabled)
                                                                      throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                             es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findProcessDefinitions in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindProcessDefinitions

        protected abstract List<es.caib.bpm.vo.ProcessDefinition> handleFindProcessDefinitions​(String name,
                                                                                               boolean onlyEnabled)
                                                                                        throws Exception
        Throws:
        Exception
      • findProcessDefinitions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.ProcessDefinition> findProcessDefinitions​(String name,
                                                                             es.caib.bpm.vo.PredefinedProcessType processType)
                                                                      throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                             es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findProcessDefinitions in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindProcessDefinitions

        protected abstract List<es.caib.bpm.vo.ProcessDefinition> handleFindProcessDefinitions​(String name,
                                                                                               es.caib.bpm.vo.PredefinedProcessType processType)
                                                                                        throws Exception
        Throws:
        Exception
      • findProcessInstances

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.ProcessInstance> findProcessInstances​(es.caib.bpm.vo.ProcessDefinition def)
                                                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                         es.caib.seycon.ng.exception.InternalErrorException,
                                                                         es.caib.bpm.exception.BPMException
        Specified by:
        findProcessInstances in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleFindProcessInstances

        protected abstract List<es.caib.bpm.vo.ProcessInstance> handleFindProcessInstances​(es.caib.bpm.vo.ProcessDefinition def)
                                                                                    throws Exception
        Throws:
        Exception
      • findProcessInstances

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.ProcessInstance> findProcessInstances​(List definitions,
                                                                         String processId,
                                                                         String estado,
                                                                         String actor,
                                                                         Date startDate,
                                                                         boolean finalizada)
                                                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                         es.caib.seycon.ng.exception.InternalErrorException,
                                                                         es.caib.bpm.exception.BPMException
        Specified by:
        findProcessInstances in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleFindProcessInstances

        protected abstract List<es.caib.bpm.vo.ProcessInstance> handleFindProcessInstances​(List definitions,
                                                                                           String processId,
                                                                                           String estado,
                                                                                           String actor,
                                                                                           Date startDate,
                                                                                           boolean finalizada)
                                                                                    throws Exception
        Throws:
        Exception
      • findSupervisorProcessDefinitions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.ProcessDefinition> findSupervisorProcessDefinitions()
                                                                                throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                                       es.caib.seycon.ng.exception.InternalErrorException,
                                                                                       es.caib.bpm.exception.BPMException
        Specified by:
        findSupervisorProcessDefinitions in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleFindSupervisorProcessDefinitions

        protected abstract List<es.caib.bpm.vo.ProcessDefinition> handleFindSupervisorProcessDefinitions()
                                                                                                  throws Exception
        Throws:
        Exception
      • findTaskDefinitions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.TaskDefinition> findTaskDefinitions​(es.caib.bpm.vo.ProcessDefinition def)
                                                                throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                       es.caib.seycon.ng.exception.InternalErrorException,
                                                                       es.caib.bpm.exception.BPMException
        Specified by:
        findTaskDefinitions in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleFindTaskDefinitions

        protected abstract List<es.caib.bpm.vo.TaskDefinition> handleFindTaskDefinitions​(es.caib.bpm.vo.ProcessDefinition def)
                                                                                  throws Exception
        Throws:
        Exception
      • findTasks

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.TaskInstance> findTasks​(List<es.caib.bpm.vo.ProcessInstance> def,
                                                           es.caib.bpm.vo.TaskDefinition task,
                                                           String actor,
                                                           Date processStartDate,
                                                           Date taskCreationDate,
                                                           boolean finalizada)
                                                    throws es.caib.seycon.ng.exception.InternalErrorException,
                                                           es.caib.seycon.ng.exception.InternalErrorException,
                                                           es.caib.bpm.exception.BPMException
        Specified by:
        findTasks in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleFindTasks

        protected abstract List<es.caib.bpm.vo.TaskInstance> handleFindTasks​(List<es.caib.bpm.vo.ProcessInstance> def,
                                                                             es.caib.bpm.vo.TaskDefinition task,
                                                                             String actor,
                                                                             Date processStartDate,
                                                                             Date taskCreationDate,
                                                                             boolean finalizada)
                                                                      throws Exception
        Throws:
        Exception
      • findTasks

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.TaskInstance> findTasks​(List<es.caib.bpm.vo.ProcessInstance> def,
                                                           String process,
                                                           es.caib.bpm.vo.TaskDefinition task,
                                                           String actor,
                                                           Date processStartDate,
                                                           Date taskCreationDate,
                                                           boolean finalizada)
                                                    throws es.caib.seycon.ng.exception.InternalErrorException,
                                                           es.caib.seycon.ng.exception.InternalErrorException,
                                                           es.caib.bpm.exception.BPMException
        Specified by:
        findTasks in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleFindTasks

        protected abstract List<es.caib.bpm.vo.TaskInstance> handleFindTasks​(List<es.caib.bpm.vo.ProcessInstance> def,
                                                                             String process,
                                                                             es.caib.bpm.vo.TaskDefinition task,
                                                                             String actor,
                                                                             Date processStartDate,
                                                                             Date taskCreationDate,
                                                                             boolean finalizada)
                                                                      throws Exception
        Throws:
        Exception
      • getActiveJobs

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.Job> getActiveJobs()
                                               throws es.caib.seycon.ng.exception.InternalErrorException,
                                                      es.caib.seycon.ng.exception.InternalErrorException,
                                                      es.caib.bpm.exception.BPMException
        Specified by:
        getActiveJobs in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleGetActiveJobs

        protected abstract List<es.caib.bpm.vo.Job> handleGetActiveJobs()
                                                                 throws Exception
        Throws:
        Exception
      • getActiveJobs

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.Job> getActiveJobs​(es.caib.bpm.vo.ProcessInstance process)
                                               throws es.caib.seycon.ng.exception.InternalErrorException,
                                                      es.caib.seycon.ng.exception.InternalErrorException,
                                                      es.caib.bpm.exception.BPMException
        Specified by:
        getActiveJobs in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleGetActiveJobs

        protected abstract List<es.caib.bpm.vo.Job> handleGetActiveJobs​(es.caib.bpm.vo.ProcessInstance process)
                                                                 throws Exception
        Throws:
        Exception
      • getActiveTasks

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.TaskInstance> getActiveTasks​(es.caib.bpm.vo.ProcessInstance process)
                                                         throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                es.caib.seycon.ng.exception.InternalErrorException,
                                                                es.caib.bpm.exception.BPMException
        Specified by:
        getActiveTasks in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleGetActiveTasks

        protected abstract List<es.caib.bpm.vo.TaskInstance> handleGetActiveTasks​(es.caib.bpm.vo.ProcessInstance process)
                                                                           throws Exception
        Throws:
        Exception
      • getAllJobs

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.Job> getAllJobs()
                                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                                   es.caib.seycon.ng.exception.InternalErrorException,
                                                   es.caib.bpm.exception.BPMException
        Specified by:
        getAllJobs in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleGetAllJobs

        protected abstract List<es.caib.bpm.vo.Job> handleGetAllJobs()
                                                              throws Exception
        Throws:
        Exception
      • getPendingTasks

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.TaskInstance> getPendingTasks​(es.caib.bpm.vo.ProcessInstance process)
                                                          throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                 es.caib.seycon.ng.exception.InternalErrorException,
                                                                 es.caib.bpm.exception.BPMException
        Specified by:
        getPendingTasks in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleGetPendingTasks

        protected abstract List<es.caib.bpm.vo.TaskInstance> handleGetPendingTasks​(es.caib.bpm.vo.ProcessInstance process)
                                                                            throws Exception
        Throws:
        Exception
      • searchProcessInstances

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public List<es.caib.bpm.vo.ProcessInstance> searchProcessInstances​(String query,
                                                                           String processID,
                                                                           Date sinceStartDate,
                                                                           Date untilStartDate,
                                                                           Date sinceEndDate,
                                                                           Date untilEndDate,
                                                                           boolean finished)
                                                                    throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                           es.caib.seycon.ng.exception.InternalErrorException,
                                                                           es.caib.bpm.exception.BPMException
        Specified by:
        searchProcessInstances in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleSearchProcessInstances

        protected abstract List<es.caib.bpm.vo.ProcessInstance> handleSearchProcessInstances​(String query,
                                                                                             String processID,
                                                                                             Date sinceStartDate,
                                                                                             Date untilStartDate,
                                                                                             Date sinceEndDate,
                                                                                             Date untilEndDate,
                                                                                             boolean finished)
                                                                                      throws Exception
        Throws:
        Exception
      • getConfiguration

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Map<String,​String> getConfiguration()
                                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                                         es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getConfiguration in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • getUIClassesForTask

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Map getUIClassesForTask​(es.caib.bpm.vo.ProcessDefinition def)
                                throws es.caib.seycon.ng.exception.InternalErrorException,
                                       es.caib.seycon.ng.exception.InternalErrorException,
                                       SQLException,
                                       IOException
        Specified by:
        getUIClassesForTask in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        SQLException
        IOException
      • handleGetUIClassesForTask

        protected abstract Map handleGetUIClassesForTask​(es.caib.bpm.vo.ProcessDefinition def)
                                                  throws Exception
        Throws:
        Exception
      • getJBpmConfiguration

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public org.jbpm.JbpmConfiguration getJBpmConfiguration()
                                                        throws es.caib.seycon.ng.exception.InternalErrorException,
                                                               es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getJBpmConfiguration in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetJBpmConfiguration

        protected abstract org.jbpm.JbpmConfiguration handleGetJBpmConfiguration()
                                                                          throws Exception
        Throws:
        Exception
      • getContext

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public org.jbpm.JbpmContext getContext()
                                        throws es.caib.seycon.ng.exception.InternalErrorException,
                                               es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getContext in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetContext

        protected abstract org.jbpm.JbpmContext handleGetContext()
                                                          throws Exception
        Throws:
        Exception
      • addComment

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void addComment​(es.caib.bpm.vo.ProcessInstance process,
                               String comment)
                        throws es.caib.seycon.ng.exception.InternalErrorException,
                               es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        addComment in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleAddComment

        protected abstract void handleAddComment​(es.caib.bpm.vo.ProcessInstance process,
                                                 String comment)
                                          throws Exception
        Throws:
        Exception
      • changeConfiguration

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void changeConfiguration​(Map<String,​String> m)
                                 throws es.caib.seycon.ng.exception.InternalErrorException,
                                        es.caib.seycon.ng.exception.InternalErrorException,
                                        IOException
        Specified by:
        changeConfiguration in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        IOException
      • endDeployParDefinitionTransfer

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void endDeployParDefinitionTransfer()
                                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                                   es.caib.seycon.ng.exception.InternalErrorException,
                                                   es.caib.bpm.exception.BPMException
        Specified by:
        endDeployParDefinitionTransfer in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleEndDeployParDefinitionTransfer

        protected abstract void handleEndDeployParDefinitionTransfer()
                                                              throws Exception
        Throws:
        Exception
      • linkProcesses

        @Transactional(rollbackFor=java.lang.Exception.class)
        public void linkProcesses​(Long parentProcess,
                                  Long childProcess)
                           throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        linkProcesses in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleLinkProcesses

        protected abstract void handleLinkProcesses​(Long parentProcess,
                                                    Long childProcess)
                                             throws Exception
        Throws:
        Exception
      • nextDeployParDefinitionPackage

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void nextDeployParDefinitionPackage​(byte[] filePackage,
                                                   int length)
                                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                                   es.caib.seycon.ng.exception.InternalErrorException,
                                                   es.caib.bpm.exception.BPMException
        Specified by:
        nextDeployParDefinitionPackage in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleNextDeployParDefinitionPackage

        protected abstract void handleNextDeployParDefinitionPackage​(byte[] filePackage,
                                                                     int length)
                                                              throws Exception
        Throws:
        Exception
      • openDeployParDefinitionTransfer

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void openDeployParDefinitionTransfer()
                                             throws es.caib.seycon.ng.exception.InternalErrorException,
                                                    es.caib.seycon.ng.exception.InternalErrorException,
                                                    es.caib.bpm.exception.BPMException
        Specified by:
        openDeployParDefinitionTransfer in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleOpenDeployParDefinitionTransfer

        protected abstract void handleOpenDeployParDefinitionTransfer()
                                                               throws Exception
        Throws:
        Exception
      • pauseJob

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void pauseJob​(es.caib.bpm.vo.Job jobvo)
                      throws es.caib.seycon.ng.exception.InternalErrorException,
                             es.caib.seycon.ng.exception.InternalErrorException,
                             es.caib.bpm.exception.BPMException
        Specified by:
        pauseJob in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handlePauseJob

        protected abstract void handlePauseJob​(es.caib.bpm.vo.Job jobvo)
                                        throws Exception
        Throws:
        Exception
      • ping

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void ping()
                  throws es.caib.seycon.ng.exception.InternalErrorException,
                         es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        ping in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • reindex

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void reindex()
                     throws es.caib.seycon.ng.exception.InternalErrorException,
                            es.caib.seycon.ng.exception.InternalErrorException,
                            IOException
        Specified by:
        reindex in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        IOException
      • handleReindex

        protected abstract void handleReindex()
                                       throws Exception
        Throws:
        Exception
      • resumeJob

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void resumeJob​(es.caib.bpm.vo.Job jobvo)
                       throws es.caib.seycon.ng.exception.InternalErrorException,
                              es.caib.seycon.ng.exception.InternalErrorException,
                              es.caib.bpm.exception.BPMException
        Specified by:
        resumeJob in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleResumeJob

        protected abstract void handleResumeJob​(es.caib.bpm.vo.Job jobvo)
                                         throws Exception
        Throws:
        Exception
      • retryJob

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void retryJob​(es.caib.bpm.vo.Job jobvo)
                      throws es.caib.seycon.ng.exception.InternalErrorException,
                             es.caib.seycon.ng.exception.InternalErrorException,
                             es.caib.bpm.exception.BPMException
        Specified by:
        retryJob in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleRetryJob

        protected abstract void handleRetryJob​(es.caib.bpm.vo.Job jobvo)
                                        throws Exception
        Throws:
        Exception
      • signal

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void signal​(es.caib.bpm.vo.ProcessInstance instanceVO)
                    throws es.caib.seycon.ng.exception.InternalErrorException,
                           es.caib.seycon.ng.exception.InternalErrorException,
                           es.caib.bpm.exception.BPMException
        Specified by:
        signal in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleSignal

        protected abstract void handleSignal​(es.caib.bpm.vo.ProcessInstance instanceVO)
                                      throws Exception
        Throws:
        Exception
      • signal

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void signal​(es.caib.bpm.vo.ProcessInstance instanceVO,
                           String transitionName)
                    throws es.caib.seycon.ng.exception.InternalErrorException,
                           es.caib.seycon.ng.exception.InternalErrorException,
                           es.caib.bpm.exception.BPMException
        Specified by:
        signal in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleSignal

        protected abstract void handleSignal​(es.caib.bpm.vo.ProcessInstance instanceVO,
                                             String transitionName)
                                      throws Exception
        Throws:
        Exception
      • startProcess

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void startProcess​(es.caib.bpm.vo.ProcessInstance process)
                          throws es.caib.seycon.ng.exception.InternalErrorException,
                                 es.caib.seycon.ng.exception.InternalErrorException,
                                 es.caib.bpm.exception.BPMException
        Specified by:
        startProcess in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleStartProcess

        protected abstract void handleStartProcess​(es.caib.bpm.vo.ProcessInstance process)
                                            throws Exception
        Throws:
        Exception
      • update

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void update​(es.caib.bpm.vo.ProcessInstance process)
                    throws es.caib.seycon.ng.exception.InternalErrorException,
                           es.caib.seycon.ng.exception.InternalErrorException,
                           es.caib.bpm.exception.BPMException
        Specified by:
        update in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleUpdate

        protected abstract void handleUpdate​(es.caib.bpm.vo.ProcessInstance process)
                                      throws Exception
        Throws:
        Exception
      • updateSwimlane

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void updateSwimlane​(es.caib.bpm.vo.TaskInstance task,
                                   String swimlane,
                                   String[] actorIds)
                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                   es.caib.seycon.ng.exception.InternalErrorException,
                                   es.caib.bpm.exception.BPMException
        Specified by:
        updateSwimlane in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleUpdateSwimlane

        protected abstract void handleUpdateSwimlane​(es.caib.bpm.vo.TaskInstance task,
                                                     String swimlane,
                                                     String[] actorIds)
                                              throws Exception
        Throws:
        Exception
      • upgradeParFile

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void upgradeParFile​(InputStream stream)
                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                   es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        upgradeParFile in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • upgradeProcess

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void upgradeProcess​(es.caib.bpm.vo.ProcessInstance instanceVO)
                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                   es.caib.seycon.ng.exception.InternalErrorException,
                                   es.caib.bpm.exception.BPMException
        Specified by:
        upgradeProcess in interface es.caib.bpm.servei.BpmEngine
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.bpm.exception.BPMException
      • handleUpgradeProcess

        protected abstract void handleUpgradeProcess​(es.caib.bpm.vo.ProcessInstance instanceVO)
                                              throws Exception
        Throws:
        Exception
      • getPrincipal

        protected Principal getPrincipal()
        Gets the current principal if one has been set, otherwise returns null.
        Returns:
        the current principal