Class AbstractRequest
- java.lang.Object
-
- org.silverpeas.core.workflow.engine.AbstractRequest
-
- All Implemented Interfaces:
AbstractRequestTask.Request<AbstractRequestTask.ProcessContext>
public abstract class AbstractRequest extends Object implements AbstractRequestTask.Request<AbstractRequestTask.ProcessContext>
Created by Nicolas on 07/06/2017.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AbstractRequest.HistoryStepDescriptor
Descriptor used to create a new history step.
-
Constructor Summary
Constructors Constructor Description AbstractRequest()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected UpdatableHistoryStep
createHistoryNewStep(AbstractRequest.HistoryStepDescriptor descriptor)
protected UpdatableHistoryStep
fetchHistoryStep(String processInstanceId, boolean existingStep)
protected HistoryStepRepository
getHistoryStepRepository()
protected ProcessInstanceRepository
getProcessInstanceRepository()
protected abstract boolean
processEvent(UpdatableProcessInstance instance, String stepId)
Processes the event mapped with the specified process instance and for the specified step.protected void
processProcessInstance(String id, GenericEvent event, UpdatableHistoryStep step)
protected void
saveError(UpdatableProcessInstance instance, GenericEvent event, Exception we)
protected void
setInstanceInError(String id)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.thread.task.AbstractRequestTask.Request
getReplacementId, process
-
-
-
-
Method Detail
-
getProcessInstanceRepository
protected ProcessInstanceRepository getProcessInstanceRepository()
-
getHistoryStepRepository
protected HistoryStepRepository getHistoryStepRepository()
-
saveError
protected void saveError(UpdatableProcessInstance instance, GenericEvent event, Exception we)
-
setInstanceInError
protected void setInstanceInError(String id)
-
createHistoryNewStep
protected UpdatableHistoryStep createHistoryNewStep(AbstractRequest.HistoryStepDescriptor descriptor)
-
fetchHistoryStep
protected UpdatableHistoryStep fetchHistoryStep(String processInstanceId, boolean existingStep)
-
processProcessInstance
protected void processProcessInstance(String id, GenericEvent event, UpdatableHistoryStep step)
-
processEvent
protected abstract boolean processEvent(UpdatableProcessInstance instance, String stepId) throws WorkflowException
Processes the event mapped with the specified process instance and for the specified step.- Parameters:
instance
- a process instance.stepId
- the identifier of the step.- Returns:
- true if the process instance is done, false otherwise. If done, the process instance can be removed from the persistence context.
- Throws:
WorkflowException
- if an error occurs.
-
-