Interface PersistentProcessingEngine

    • Method Detail

      • run

        java.lang.String run​(WorkflowInstanceDescr<?> wfInstanceDescr,
                             java.sql.Connection con)
                      throws DuplicateIdException,
                             CopperException
        Enqueues the workflow instance into the engine for execution.
        Parameters:
        wfInstanceDescr - workflow instance descriptions to run
        con - connection used for the inserting the workflow to the database
        Returns:
        workflow instance ID
        Throws:
        CopperException - if the engine can not run the workflow, e.g. in case of a unknown processor pool id
        DuplicateIdException - if a workflow instance with the same id already exists
      • runBatch

        void runBatch​(java.util.List<WorkflowInstanceDescr<?>> wfInstanceDescr,
                      java.sql.Connection con)
               throws DuplicateIdException,
                      CopperException
        Enqueues the specified list of workflow instances into the engine for execution.
        Parameters:
        wfInstanceDescr - the list of workflow instance descriptions to run
        con - connection used for the inserting the workflow to the database
        Throws:
        CopperException - if the engine can not run the workflow, e.g. in case of a unknown processor pool id
        DuplicateIdException - if a workflow instance with the same id already exists
      • restart

        void restart​(java.lang.String workflowInstanceId)
              throws java.lang.Exception
        Trigger restart a workflow instance that is in the error state.
        Parameters:
        workflowInstanceId - id of workflow which shall be restarted
        Throws:
        java.lang.Exception - any exception happening on this request, like sql connection lost. Note: If id doesn't exist or the workflow with this id is not in error/invalid-state, this method just returns with doing nothing.
      • restartAll

        void restartAll()
                 throws java.lang.Exception
        Trigger restart of all workflow instances that are in error state.
        Throws:
        java.lang.Exception - restart(String).
      • restartFiltered

        void restartFiltered​(org.copperengine.management.model.WorkflowInstanceFilter filter)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • notify

        void notify​(Response<?> response,
                    java.sql.Connection c)
             throws CopperRuntimeException
        Adds a response to the engine, using the provided jdbc connection. The engine will subsequently try to find the corresponding workflow instance that is waiting for the response. Depending on the workflow instances waitmode and the number of open responses, the workflow may or may not be resumed.
        Parameters:
        response - the reponse
        c - jdbc connection to use
        Throws:
        CopperRuntimeException - any exception occuring in this operation (Like SQL connection lost) will be wrapped into this exception.
      • notify

        void notify​(java.util.List<Response<?>> responses,
                    java.sql.Connection c)
             throws CopperRuntimeException
        Adds a list of responses to the engine, using the provided jdbc connection. The engine will subsequently try to find the corresponding workflow instance that is waiting for the response. Depending on the workflow instances waitmode and the number of open responses, the workflow may or may not be resumed.
        Parameters:
        responses - the list of reponses
        c - jdbc connection to use
        Throws:
        CopperRuntimeException - any exception occuring in this operation (Like SQL connection lost) will be wrapped into this exception.