@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
ExecutableTask
start
in interface ExecutableTask
null
ErrorException
- 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 ExecutableTask
null
ErrorException
- the BPMN errorprotected abstract java.lang.String getType(TaskContext context)
context
- protected abstract java.io.Serializable createContent(TaskContext context) throws ErrorException
context
- ErrorException
protected void processReply(TaskContext context, java.lang.Object data) throws ErrorException
context
- data
- ErrorException
protected 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
- ErrorException
protected Todo createTodo(TaskContext context, java.lang.String type, java.io.Serializable content) throws ErrorException
context
- type
- content
- ErrorException
protected com.whitestein.lsps.human.UIImplementationType getTodoImplementationType(java.io.Serializable content)
public void terminate(TaskContext context, TerminationReason reason) throws ErrorException
ExecutableTask
terminate
in interface ExecutableTask
ErrorException
- the BPMN errorErrorException
public void escalate(TaskContext context, java.lang.String reason)
EscalatableTask
escalate
in interface EscalatableTask
reason
- reason of escalationpublic java.util.Date getEscalationDate(TaskContext context) throws ErrorException
EscalatableTask
getEscalationDate
in interface EscalatableTask
ErrorException
public void suspend(TaskContext context)
SuspendableTask
suspend
in interface SuspendableTask
context
- the task contextpublic void resume(TaskContext context)
SuspendableTask
resume
in interface SuspendableTask
context
- 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.