Package org.copperengine.core
Interface PersistentProcessingEngine
-
- All Superinterfaces:
ProcessingEngine
- All Known Implementing Classes:
PersistentScottyEngine
public interface PersistentProcessingEngine extends ProcessingEngine
Adds some persistence specific methods to the ProcessingEngine interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
notify(java.util.List<Response<?>> responses, java.sql.Connection c)
Adds a list of responses to the engine, using the provided jdbc connection.void
notify(Response<?> response, java.sql.Connection c)
Adds a response to the engine, using the provided jdbc connection.void
restart(java.lang.String workflowInstanceId)
Trigger restart a workflow instance that is in the error state.void
restartAll()
Trigger restart of all workflow instances that are in error state.void
restartFiltered(org.copperengine.management.model.WorkflowInstanceFilter filter)
java.lang.String
run(WorkflowInstanceDescr<?> wfInstanceDescr, java.sql.Connection con)
Enqueues the workflow instance into the engine for execution.void
runBatch(java.util.List<WorkflowInstanceDescr<?>> wfInstanceDescr, java.sql.Connection con)
Enqueues the specified list of workflow instances into the engine for execution.-
Methods inherited from interface org.copperengine.core.ProcessingEngine
addShutdownObserver, addWaitHook, createUUID, getEngineId, getEngineState, notify, registerCallbacks, run, run, runBatch, shutdown, startup
-
-
-
-
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 runcon
- 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 idDuplicateIdException
- 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 runcon
- 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 idDuplicateIdException
- 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 reponsec
- 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 reponsesc
- jdbc connection to use- Throws:
CopperRuntimeException
- any exception occuring in this operation (Like SQL connection lost) will be wrapped into this exception.
-
-