@PermitAll public abstract class BaseTodoTask extends 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,
String type,
Serializable content)
Creates a to-do (calls
createTodo(TaskContext, String, Serializable) ) and adds the to-do
to the database. |
protected abstract Serializable |
createContent(TaskContext context)
This method should return the todo content, it is called when starting a todo-task.
|
protected Todo |
createTodo(TaskContext context,
String type,
Serializable content)
Creates a to-do and sets initial values.
|
void |
escalate(TaskContext context,
String reason)
Task itself defines what is executed during escalation.
|
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.
|
String |
getTitle()
Returns the todo title.
|
protected Todo |
getTodo(TaskContext context)
Returns the todo.ui
|
TodoDao |
getTodoDao()
Returns the provided todo dao.
|
protected Long |
getTodoId(TaskContext context)
Returns to-do id.
|
protected com.whitestein.lsps.human.UIImplementationType |
getTodoImplementationType(Serializable content) |
protected abstract String |
getType(TaskContext context)
This method should return the todo-task type.
|
ExecutableTask.Result |
processInput(TaskContext context,
Object input)
The method for processing the model instance input.
|
protected void |
processReply(TaskContext context,
Object data)
Process the data submitted by the user.
|
protected String |
removeTodo(TaskContext context,
TodoStatus status,
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, 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 String getType(TaskContext context)
context
- protected abstract Serializable createContent(TaskContext context) throws ErrorException
context
- ErrorException
protected void processReply(TaskContext context, Object data) throws ErrorException
context
- data
- ErrorException
protected Long getTodoId(TaskContext context)
context
- protected Todo getTodo(TaskContext context)
context
- protected String removeTodo(TaskContext context, TodoStatus status, String interruptionReason)
context
- status
- interruptionReason
- protected Todo addTodo(TaskContext context, String type, 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, String type, Serializable content) throws ErrorException
context
- type
- content
- ErrorException
protected com.whitestein.lsps.human.UIImplementationType getTodoImplementationType(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, String reason)
EscalatableTask
escalate
in interface EscalatableTask
reason
- reason of escalationpublic 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 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.