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:
Go to Planning > Operation Plan > Operation Plan Definition.

The Operation Plan page appears.

Select Execution Preview from the Add Counter dropdown of the required Operation Plan.

The Execution Preview dialog appears.

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:
Click Set Date. Select a Timezone and a starting date to simulate the required date. Click Confirm.'

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

Note
You can use this option to check Operation Plans that are set to run at a particular time.
Click Activate in the tab General Settings of the Operation Plan.

An active instancew is now available for Execution Preview.

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 :

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.
Click New Event to simulate the remaining types of Event Triggers.

Result : The Event dialog appears.
Select the Template that is associated with the Event.

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.

Click the Event History and Tasks Created to check the Events triggered and the corresponding actions performed in the Execution Preview.




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:
Click Run a scenario.

Enter or paste the JS script for the scenario. There are two alternatives to add your scripts:
Enter the JS script directly in the editor.

You can use the FieldLogs Keywords functions (
Flkw:functions) in the JS Script to access Operation Plan data.
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.
