@PermitAll
public abstract class BaseTodoTask
extends java.lang.Object
implements com.whitestein.lsps.human.task.TodoTask
ExecutableTask.Result| Modifier | Constructor and Description |
|---|---|
protected |
BaseTodoTask()
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected Todo |
addTodo(TaskContext context,
java.lang.String type,
java.io.Serializable content)
Creates a to-do (calls
createTodo(TaskContext, String, Serializable)) and adds the to-do
to the database. |
protected abstract java.io.Serializable |
createContent(TaskContext context)
This method should return the todo content, it is called when starting a todo-task.
|
protected Todo |
createTodo(TaskContext context,
java.lang.String type,
java.io.Serializable content)
Creates a to-do and sets initial values.
|
void |
escalate(TaskContext context,
java.lang.String reason)
Task itself defines what is executed during escalation.
|
java.util.Date |
getEscalationDate(TaskContext context)
Returns escalation timeout
|
RecordHolder |
getEscalationTimeout()
Returns the escalation timeout.
|
HumanTypeFactory |
getHumanHolderConverter()
Returns the provided human holder converter.
|
ReferenceHolder |
getIssuedTodo()
Returns the issued todo reference.
|
protected ModelInstanceUtilsService |
getModelInstanceUtilsService()
Returns model modelInstanceUtils service
|
protected ModelProviderService |
getModelProviderService()
Returns model provider service
|
OrgTypeFactory |
getPerformerHolderConverter()
Returns the provided performer holder converter.
|
SetHolder |
getPerformers()
Returns the todo performers.
|
java.lang.String |
getTitle()
Returns the todo title.
|
protected Todo |
getTodo(TaskContext context)
Returns the todo.ui
|
TodoDao |
getTodoDao()
Returns the provided todo dao.
|
protected java.lang.Long |
getTodoId(TaskContext context)
Returns to-do id.
|
protected com.whitestein.lsps.human.UIImplementationType |
getTodoImplementationType(java.io.Serializable content) |
protected abstract java.lang.String |
getType(TaskContext context)
This method should return the todo-task type.
|
ExecutableTask.Result |
processInput(TaskContext context,
java.lang.Object input)
The method for processing the model instance input.
|
protected void |
processReply(TaskContext context,
java.lang.Object data)
Process the data submitted by the user.
|
protected java.lang.String |
removeTodo(TaskContext context,
TodoStatus status,
java.lang.String interruptionReason)
Sets the status of the to-do.
|
void |
resume(TaskContext context)
Called when the model instance is resumed.
|
ExecutableTask.Result |
start(TaskContext context)
An initial method that is called when the task execution starts.
|
void |
suspend(TaskContext context)
Called when the model instance is suspended.
|
void |
terminate(TaskContext context,
TerminationReason reason)
Called when this task is to be terminated.
|
public ExecutableTask.Result start(TaskContext context) throws ErrorException
ExecutableTaskstart in interface ExecutableTasknullErrorException - the BPMN errorpublic ExecutableTask.Result processInput(TaskContext context, java.lang.Object input) throws ErrorException
ExecutableTask
This method is invoked when a previous call to either
start method or
processInput method returned
WAITING_FOR_INPUT and a new input is to
be process by the model instance.
processInput in interface ExecutableTasknullErrorException - the BPMN errorprotected abstract java.lang.String getType(TaskContext context)
context - protected abstract java.io.Serializable createContent(TaskContext context) throws ErrorException
context - ErrorExceptionprotected void processReply(TaskContext context, java.lang.Object data) throws ErrorException
context - data - ErrorExceptionprotected java.lang.Long getTodoId(TaskContext context)
context - protected Todo getTodo(TaskContext context)
context - protected java.lang.String removeTodo(TaskContext context, TodoStatus status, java.lang.String interruptionReason)
context - status - interruptionReason - protected Todo addTodo(TaskContext context, java.lang.String type, java.io.Serializable content) throws ErrorException
createTodo(TaskContext, String, Serializable)) and adds the to-do
to the database.context - type - content - ErrorExceptionprotected Todo createTodo(TaskContext context, java.lang.String type, java.io.Serializable content) throws ErrorException
context - type - content - ErrorExceptionprotected com.whitestein.lsps.human.UIImplementationType getTodoImplementationType(java.io.Serializable content)
public void terminate(TaskContext context, TerminationReason reason) throws ErrorException
ExecutableTaskterminate in interface ExecutableTaskErrorException - the BPMN errorErrorExceptionpublic void escalate(TaskContext context, java.lang.String reason)
EscalatableTaskescalate in interface EscalatableTaskreason - reason of escalationpublic java.util.Date getEscalationDate(TaskContext context) throws ErrorException
EscalatableTaskgetEscalationDate in interface EscalatableTaskErrorExceptionpublic void suspend(TaskContext context)
SuspendableTasksuspend in interface SuspendableTaskcontext - the task contextpublic void resume(TaskContext context)
SuspendableTaskresume in interface SuspendableTaskcontext - the task contextpublic java.lang.String getTitle()
public SetHolder getPerformers()
public ReferenceHolder getIssuedTodo()
public RecordHolder getEscalationTimeout()
public TodoDao getTodoDao()
public HumanTypeFactory getHumanHolderConverter()
public OrgTypeFactory getPerformerHolderConverter()
protected ModelProviderService getModelProviderService()
protected ModelInstanceUtilsService getModelInstanceUtilsService()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.