An Action Plan is a flow of Actions that should be executed in order to satisfy a given Goal.
An Action Plan is generated by Watcher when an Audit is successful which implies that the Strategy which was used has found a Solution to achieve the Goal of this Audit.
In the default implementation of Watcher, an Action Plan is only composed of successive Actions (i.e., a Workflow of Actions belonging to a unique branch).
However, Watcher provides abstract interfaces for many of its components, allowing other implementations to generate and handle more complex Action Plan(s) composed of two types of Action Item(s):
An Action Plan may be described using standard workflow model description formats such as Business Process Model and Notation 2.0 (BPMN 2.0) or Unified Modeling Language (UML).
An Action Plan has a life-cycle and its current state may be one of the following:
Bases: watcher.objects.base.WatcherObject
Create a Action record in the DB.
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Action(context) |
---|
Delete the action plan from the DB.
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Action(context) |
---|
Find a action_plan based on its id or uuid and return a Action object.
Parameters: | action_plan_id – the id or uuid of a action_plan. |
---|---|
Returns: | a Action object. |
Find a action_plan based on its integer id and return a Action object.
Parameters: | action_plan_id – the id of a action_plan. |
---|---|
Returns: | a Action object. |
Find a action_plan based on uuid and return a Action object.
Parameters: |
|
---|---|
Returns: | a Action object. |
Return a list of Action objects.
Parameters: |
|
---|---|
Returns: | a list of ActionPlan object. |
Loads updates for this Action plan.
Loads a action_plan with the same uuid from the database and checks for updated attributes. Updates are applied from the loaded action_plan column by column, if there are any updates.
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Action(context) |
---|
Save updates to this Action plan.
Updates will be made column by column based on the result of self.what_changed().
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Action(context) |
---|
Soft Delete the Action plan from the DB.
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Audit(context) |
---|