Skip to main content

FieldLogs

Creating an Operation Plan Lifecycle

An Operation Plan Lifecycle specifies the workflow of the Actions in an Operation Plan Counter. When the Counter is activated, Actions are executed, generating the respective Tasks.

The diagram below illustrates the working of an Operation Plan Lifecycle.

OPLifecycleWorkflow.png

You can build a Custom Lifecycle of type OP Plan.

To create an Operation Plan Lifecycle:

  1. Select the type OP Plan from the dropdown list as shown below.

    OPPlanDropdown.png
  2. Drag the required elements from the UI panel to build a Custom Lifecycle.

    Lifecycle.png

    In the below example, the different stages of the Basic Maintenance Lifecycle are highlighted. There are four Sub-Process Task elements as shown below.

    BasicMaintenanceLifecycle.png

    Each Task contains a Sub-Process. The Sub-process workflow includes a Script Task and a User Task as shown below.

    Sub-Process.png

    In the Script Task, the JavaScript is added to the Script expression field.

    JavaSript.png

    In this example, the below script is added to execute the Operation Plan Action and generate a Task.

    JavaScriptImage.png

    The values of the highlighted variables, userTaskDefinitioId and actionId are modified for each Action.

    HighlightedVariables.png

    The Action ID of the respective Action in an Operation Plan Counter is used in the script as shown below.

    ActionIDinOPPlan.png
    ActionIDHighlight.png

    Similarly, the User Task ID is used in the script as shown below.

    ActionID.png
    UserTaskIDHighlighted.png

    The FieldLogs Task property of the User Task is set to Routine Task.

    RoutineTask.png

    Each stage of the Lifecycle is associated with an Action. When an Action is triggered with the help of the script added, the respective Task is generated. On the completion of each Task, different Tasks can be generated based on the definition of the Lifecycle.

    A Parallel Gateway and an Exclusive Gateway are used in the Lifecycle to determine the execution pathways.

    Conditions can also be set to trigger different Actions.

    The result of the Task execution is mapped to decision actions that are controlled by a Lifecycle variable named 'decision' with values as follows:

    • Task Done = 1

    • Task Fail = 0

    • Task Archive = 9

    These decision values enable conditional branching within the workflow diagram. Depending on the action performed, the workflow uses the 'decision' variable to route the process to the appropriate next step.

  3. Click Save.

    Save.png

    You can save the workflow diagram at any point during creation, which will save it as a Draft. This allows you to pause and resume work without losing progress.

    When the Lifecycle design is complete, you can Publish it.

  4. Click Publish.

    Publish.png

    You have created an OP Plan Lifecycle that can generate Operation Plan Tasks.