Analytics Manager > Working with Analysis Replays > Create an Analysis Replay
  
Create an Analysis Replay
An analysis replay works only if the thing on which you are running the replay includes logged property history. The data source used to map inputs to the analysis event must include mapped properties that are logged to the ThingWorx Value Stream. For information about logging property history, see Value Streams in the ThingWorx Help Center.
* 
You cannot create analysis replay on time series analysis events.
Complete the following steps to create an analysis replay:
1. Use one of the following options to navigate to the Analysis Replay page:
From the left navigation pane, select Analysis Replay, and click the Configuration tab.
From the Analysis Events page, select the event that you want to create the replay for, and click Replay.
* 
The Analytics Manager framework provides the TW.AnalysisServices.AnalysisResourceProvider thing. Use the AnalysisReplayEvent event that is defined on this thing to create an analysis event. To map input data, in the Source Type (Required) list, select Thing, and in the Source (Required) list, select the thing for which you want to replay data, and map input data.
2. In the Replay Name field, enter the name of the replay.
3. In the Description field, enter a description for the replay.
4. In the Replay Event field, click Event, and from the list of events, select the event that you want to replay.
As soon as you select the event, the Data Source field updates automatically to the source that you selected while creating the analysis event.
5. Depending on how you configured your event, use one of the following options to configure how you want to run the replay:
Configuration of analysis event
How to run the analysis replay
AnyDataChange or DataChange
Use one of the following options:
At a specific frequency:
1. In the Replay Step Frequency field, select the Every 'n' seconds check box.
2. In the text box, set the time interval in seconds to execute the replay within the selected time range. The default value is 60 seconds.
For example, if you have set the time interval to 10 seconds, the replay is executed every 10 seconds from the start time specified in the Replay Duration field.
* 
In this case, every time slice is used as a value of the inputTimestamp field.
On Source event:
1. Select the On Source Event check box. The replay is executed exactly when the event had occurred.
* 
In this case, the time at which the event had occurred is used as the value of the inputTimestamp field.
On any other trigger
Use one of the following options:
At a specific frequency:
1. In the Replay Step Frequency field, select the Every 'n' seconds check box.
2. In the text box, set the time interval in seconds to execute the replay within the selected time range. The default value is 60 seconds.
For example, if you have set the time interval to 10 seconds, the replay is executed every 10 seconds from the start time specified in the Replay Duration field.
* 
In this case, every time slice is used as a value of the inputTimestamp field.
On data change of a property:
1. Select the On Data Change check box.
2. From the list, select the property on whose data change you want to execute the replay. From the list, you can select a specific property or select ANY to run the replay on data change of any property.
* 
In this case, the time at which the event had occurred is used as the value of the inputTimestamp field.
6. In the Replay Duration field, set the time frame of the analysis event that you want to replay. The default start time is set to an hour less than the current system time. The default end time is set to the current system time.
Use one of the following options to set the time frame:
Click ON to update the start time and end time to the default values. When the start time and end time is set to the default values, click Refresh Now to update the time to the exact current time of the system.
Click Stating Date and Ending Date, and enter the values of date, hour, minutes, and seconds manually.
Click or to increase or decrease the time by an hour.
Click or to increase or decrease the time by 15 minutes.
Click to increase the time by 1 second.
After you set the start time, click Update Data to get inputs at that specified time.
7. From the Run on Host drop-down list, select the host on which you want to run the replay. The default value is ANY which allows the replay to run on any host.
8. In the Replay Mode field, you can choose either of the following options:
Select the Step By Step check box to execute the replay as one replay record at a time.
Select the Continuous check box to execute the replay records continuously one after the other.
Select the Single Execution check box to execute the replay records as a single job. A single execution job is submitted as an asynchronous analysis job.
* 
Ensure that your model file supports single execution.
9. Click Map Results to map the results of replay execution to the entities that are defined in the selected event result mapping.
* 
You can map replay results only if the analysis event on which you are running the replay is not enabled.
For information about timestamp mapping for results, see “Result Timestamp Mapping” in Map Result Data.
10. Click Start Replay to start the replay.
* 
The replay is not started if the model on which the analysis event is created is not deployed on any host. Internally, the model deployment starts. After the model deployment completes successfully, a message is displayed on the screen, and the replay starts automatically.
If the model deployment fails or times out, an error message is displayed on the screen.
11. Under the Execution section, you can view the progress of the replay. Depending on how you have configured your replay, you can control the execution by using one of the following options:
For a step by step replay, click the Next icon to execute the next replay entry. To go back to the previous replay entry, click the Previous icon.
For a continuous replay, click the Pause icon to pause the replay. To resume the replay from the record where it was paused, click the Resume icon.
* 
The Execution section is not available when you run the replay in the Single Execution mode.
12. Under the Inputs To Analysis section, view the input details of a job that is currently being executed.
* 
The Inputs To Analysis section is not available when you run the replay in the Single Execution mode.
13. From the Export Format list, select XML or JSON to export input entries of the replay as a <replay-id>.xml file or <replay-id>.json file, respectively.
* 
You cannot export replay data when you run the replay in the Single Execution mode.
You can export replay data and perform computations in an external tool. If you want to review these computations in Analytics Manager, you can import the updated replay data file, and continue the replay. For more information about importing the replay data file, see the ImportReplayResults service in Managing Replays. Ensure that you have created the replay before you import the replay data file.
14. Click Delete Replay to delete the current analysis replay and clean up all replay data for the current user.
For a user at any given time, you can have only one configured replay.
The following video demonstrates the process of creating and reviewing an analysis replay: