Task and TaskReqmt Models

There are 2 models that make up the Task framework: Task and TaskReqmt.

Table 15.1. Task Fields

FieldRequiredDescription
IDRequiredUnique ID is the sole Natural Key for this Task.
OwningOrgRequiredA model link to an Owning Organization for the Task.
TaskTypeRequiredFully-qualified Java class name extending the base class com.onenetwork.platform.common.task.AbstractTaskType, which has callbacks like onStart and onComplete that are called when the task changes state.
StateRequiredHolds the state for the Task and is governed by its state machine. Currently, the state machine contains 3 states: Pending, InProgress, and Completed.
ParentTaskOptionalA model link to a parent Task.
SequenceRequired for Tasks with a non-null ParentTaskThis should be a unique integer among the direct child Tasks for a parent Task; it dictates the order they appear in the UI.
RequiredForParentCompletionOptionalIf set to true, then this Task must enter the Completed state before its parent Task.
AutocompleteOnChildrenCompleteOptionalIf set to true, then this Task will automatically enter the Completed state when the last required child Task is Completed.
ParamsJSONOptionalThis is a CLOB of JSON for holding TaskType-dependent parameters needed at runtime. This will be discussed in more detail later.


Table 15.2. TaskReqmt Fields

FieldRequiredDescription
RequiringTaskRequiredA model link to a Task that has a dependency on another Task.
RequiredTaskRequiredA model link to a Task that is needed by the RequiringTask.
RequirementTypeRequiredThere is currently only 1 type: BeforeStart, which dictates that the RequiringTask cannot move from the Pending state to InProgress until RequiredTask has been marked Completed.