Skip to main content

FieldLogs

Viewing the Execution Preview of an Operation Plan

The Execution Preview enables you to simulate your Operation Plan Definition by triggering mock events and checking its behavior.

This helps you validate your Operation Plan setup before going live, reducing errors in production.

The Execution Preview can be run on the Operation Plan Definition. You can run the Execution Preview directly on the Operation Plan Definition, without creating or activating an instance.

The Execution Preview does not download any actual data.

To run an Execution Preview on an Operation Plan Definition:

  1. Go to Planning > Operation Plan > Operation Plan Definition.

    GOP-Define1.png

    The Operation Plan page appears.

    GOP-OPDefPg.png
  2. Select Execution Preview from the Add Counter dropdown of the required Operation Plan.

    OPEP1.png

    The Execution Preview dialog appears.

    OPEP2.png

    The Execution Preview can be viewed for the following types of Counters :

    By default, the current system date and time are displayed as highlighted above.

    You can change the date and time to simulate a different date and time to preview time-based Triggers.

    To change the date and time:

    1. Click Set Date. Select a Timezone and a starting date to simulate the required date. Click Confirm.'

      OPEPSetDate.png
    2. Click Add Time. Enter the hours, minutes, and seconds. Click Confirm.

      OPEPAddTime.png

      Note

      You can use this option to check Operation Plans that are set to run at a particular time.

  3. Click Activate in the tab General Settings of the Operation Plan.

    OPEPActivate.png

    An active instancew is now available for Execution Preview.

    OPEPActivated.png

    This active instance responds to the following types of Event Triggers:

    • Operation Plan Activated

    • Counter Activated

    • Time-based

    • Task Started

    • Task Done

    • Measurement Point

    • Task Progress

    • Multiple Tasks Done

    • Data Object Saved

    • Data Object Deleted

      Note

      Data Object Saved and Data Object Deleted cannot be simulated in Execution Preview. A log as below would be seen in the Execution Preview window :

      DataObjError.png

    Note

    Activate creates an instance for the current Execution Preview only. The scope of this instance is limited to this window. Once this window is closed, the instance cannot be accessed again.

    Activating a sub-counter automatically activates the parent Counters.

  4. Click New Event to simulate the remaining types of Event Triggers.

    OPEPClickNewEvent.png

    Result : The Event dialog appears.

    Select the Template that is associated with the Event.

    OPEPNewEventDialog.png

    You can select from the following three types of Events:

    • Task Started

    • Task Marked Done

    • Executed Measure Point Saved

    These Events, combined with the Event Triggers in Step 3, cover all available Event Trigger types.

    OPEP-3typesofEvents.png
  5. Click the Event History and Tasks Created to check the Events triggered and the corresponding actions performed in the Execution Preview.

    OPEP-EventsHistory.png
    OPEP-TasksCreated.png
    TaskHistoryOutput.png
    TaskHistoryOutput.png

    The Actions and Tasks are only simulated. They cannot be executed.

Note

You can simulate Create Task, Update Task and Notifications actions in the Execution Preview.

You can run JS scripts that automate scenarios for the Execution Preview.

To run a scenario using JS scripts:

  1. Click Run a scenario.

    OPEP-RunaScenario1.png
  2. Enter or paste the JS script for the scenario. There are two alternatives to add your scripts:

    1. Enter the JS script directly in the editor.

      OPEP-AddJS.png

      You can use the FieldLogs Keywords functions (Flkw: functions) in the JS Script to access Operation Plan data.

      OPEPRunScenarioFlkw.png
    2. Click Browse and select the JS file containing the automation scripts.

      Use Flkw:RunScenario() to run the script.

      The example below shows BatteryInspectionTestScenarios.js uploaded with Flkw:RunScenario() used to run it.

      OPEP-RunScenarioScript.png