FactoryTalk Analytics Integration > Scoring Result Custom Processor
Scoring Result Custom Processor
Overview
The Scoring Result custom processor can be built into a DataFlowML pipeline and used to retrieve prediction results from a specific batch scoring job run against a ThingWorx Analytics model. The Scoring Result custom processor requires specific input parameters in order to identify the results to retrieve. When the processor is built into a DataFlowML pipeline and launched, it can use a Job ID from an Asynchronous Prediction processor to retrieve batch scoring predictions. The results are returned to your pipeline in a CSV string and can be used by other downstream processors.
Uploading and Configuring the Processor
To use the Scoring Result processor, add it to a pipeline in DataFlowML and configure it with parameters as described below.
1. In DataFlowML, select Data Pipeline from the left navigation panel (). The Pipeline Definition page opens.
2. In the panel on the right, ensure that the Auto Inspection option is enabled. The default is enabled:
3. Upload the JAR file containing the custom processors as follows:
Click the Upload option (). A file selection dialog box opens.
File Selection dialog box
Select the JAR file that contains the custom processors.
Click OK. The JAR file is uploaded.
* 
This JAR file must be uploaded once for each pipeline that you create.
4. Navigate to the Processors tab and select the Custom processor. Drag is to the pipeline page on the left to add it to the pipeline.
5. When the Custom processor has been added to the pipeline, right-click on the processor icon (). The Configuration Settings – Custom dialog box opens.
config settings dialog box
6. On the Configuration tab, enter the following Implementation Class value to identify the Custom processor as the Scoring Results processor:
com.thingworx.analytics.rockwell.processor.ResultProcessor
7. Click Add Configuration. A parameter row with two columns is added.
8. In the left column enter a key and in the right column, enter a corresponding value. For a list of the required and optional configuration parameters, see the charts below.
* 
Because the Scoring Result custom processor communicates with both the ThingWorx Analytics Prediction and Results microservers, connection parameters for both microservers are necessary. These parameters are included in the tables below.
9. Repeat steps 7 and 8 until all necessary parameters are added.
completed config settings dialog box
10. After all parameters for the processor are added, click Save. The processor configuration is saved and the dialog box closes.
Required Configuration Parameters
Key
Value
Implementation Class
com.thingworx.analytics.rockwell.processor.ResultProcessor
TWA_PREDICTION_IP
The IP address of your ThingWorx Analytics Prediction microserver.
TWA_PREDICTION_PORT
The port where ThingWorx Analytics Prediction microserver is connected.
To locate the port number, navigate to your ThingWorx Analytics Server installation directory and open the config/system-environment-variables.properties file. Port numbers are listed for each microservice.
TWA_USE_PROXY
false = not installed behind a reverse proxy, true = is installed behind a reverse proxy
TWA_RESULTS_IP
The IP address of your ThingWorx Analytics Results microserver.
TWA_RESULTS_PORT
The port where ThingWorx Analytics Results microserver is connected.
To locate the port number, navigate to your ThingWorx Analytics Server installation directory and open the config/system-environment-variables.properties file. Port numbers are listed for each microservice.
Optional Configuration Parameters
Key
Value
TWA_PREDICTION_PROXY_PATH
A URL for the reverse proxy, if in use. Optional parameter. Default path is /prediction.
TWA_RESULTS_PROXY_PATH
A URL for the reverse proxy, if in use. Optional parameter. Default path is /results.
TWA_PREDICTION_USE_SSL
false = running on HTTP, true = running on HTTPS
TWA_RESULTS_USE_SSL
false = running on HTTP, true = running on HTTPS
Processor Input
The Scoring Result processor requires a Job ID from a batch scoring job to run. The input should be in the form shown below.
{
"jobId": ""
}
Processor Output
The Scoring Result processor outputs prediction results in the form of a CSV string, as shown below. The results are returned to your pipeline for use in other processors.
{
"state": "",
"result": ""
}
For information about how to understand prediction results, see Interpreting Prediction Processor Output.
Was this helpful?