Task¶
-
public class
Task
¶ A task is set of actions that are executed in response to a trigger. The actions and the trigger are defined by their respective
Channel
s.
Constructors¶
Task¶
-
public
Task
(String name, TaskTriggerInformation trigger, List<TaskActionInformation> actions)¶ Constructor.
Parameters: - name – the task name
- trigger – the task trigger
- actions – the list of related actions
Task¶
-
public
Task
(String name, TaskTriggerInformation trigger, List<TaskActionInformation> actions, TaskConfig taskConfig, boolean enabled, boolean hasRegisteredChannel)¶ Constructor.
Parameters: - name – the task name
- trigger – the task trigger
- actions – the list of related actions
- taskConfig – the task configuration
- enabled – defines if this task is enabled
- hasRegisteredChannel – defines if this task has a registered channel
Methods¶
addAction¶
-
public void
addAction
(TaskActionInformation action)¶ Stores the given action.
Parameters: - action – the action
getActions¶
-
public List<TaskActionInformation>
getActions
()¶
getTaskConfig¶
-
public TaskConfig
getTaskConfig
()¶
getTrigger¶
-
public TaskTriggerInformation
getTrigger
()¶
incrementFailuresInRow¶
-
public void
incrementFailuresInRow
()¶ Increases the counter of task execution failures that occurred since the last successful execution of this task or since the task was enabled.
resetFailuresInRow¶
-
public void
resetFailuresInRow
()¶ Resets the counter of task execution failures that occurred since the last successful execution of this task or since the task was enabled.
setActions¶
-
public void
setActions
(List<TaskActionInformation> actions)¶
setTaskConfig¶
-
public void
setTaskConfig
(TaskConfig taskConfig)¶
setTrigger¶
-
public void
setTrigger
(TaskTriggerInformation trigger)¶