Advanced Customization > Executing Info*Engine services with the OData Connector
  
Executing Info*Engine services with the OData Connector
ThingWorx Navigate now supports the OData Connector to execute Info*Engine tasks. If your custom tasks use Info*Engine tasks, use the OData connector to call these Info*Engine tasks.
For the most up-to-date information on OData Connector support for Windchill, check the Platform Support Matrix for ThingWorx Navigate.
* 
In the upcoming releases of ThingWorx Navigate, support for the Windchill connectors, ptc-windchill-connector and ptc-windchill-swagger-connector, will be deprecated. For a smooth transition to a release that does not have support for the old Windchill connectors, execute your Info*Engine tasks with ptc-windchill-OData-connector now, using the steps in this topic.
To use the OData connector to execute Info*Engine tasks, first configure the ptc-windchill-OData-connector to connect to the Info*Engine domain Windchill OData REST services. Then, you can use Windchill OData REST services to execute Info*Engine tasks.
* 
You must configure Integration Runtime. For more information, refer to the Set Up Integration Runtime topic.
When configuring ptc-windchill-OData-connector, any previous customizations done on the out-of-the-box ptc-windchill-OData-connector need to be recreated.
1. In ThingWorx Composer, search for ptc-windchill-OData-connector, and then open it. The General Information page opens.
2. Click Configuration. The Configuration page opens.
Your configuration depends on your authentication method: Single Sign-on, Windchill Authentication, or Fixed Authentication.
Single Sign-on
Follow these steps if you have Single Sign-on configured:
1. Under Generic Connector Connection Settings, for the Authentication Type, select SSO.
2. Under Authorization Server ID, enter the AuthorizationServerSettingsID value you provided in sso-settings.json, such as PingFed1.
3. Under Authorization Server Scopes Settings, click Add. The AuthorizationServerScopesSettings window opens.
4. Under Scope, enter the Windchill scope you registered in PingFederate, such as WINDCHILL.
5. Click Add.
6. Under CSRF Settings, enter this information:
Relative URL For CSRF Get Request/servlet/odata
CSRF Token NameCSRF_NONCE
7. Under HTTP Connector Connection Settings, enter this information:
Base URL—The Windchill URL. The URL must end with /oauth. Use this format:
[https]://[Windchill Host]:[port]/[Windchill-web-app]/oauth
This format specifies that the connection uses the OAuth standard and enables requests for data in the resource provider.
Relative URL/servlet/odata
There’s no need to enter the user name and the password.
8. Click Save. The OData connector is now configured to work in your Single Sign-on environment.
Now, skip ahead to the section “Executing Info*Engine tasks”.
Windchill Authentication
Follow these steps if you have Windchill Authentication configured:
1. Under Generic Connector Connection Settings, for the Authentication Type, select None.
2. Under CSRF Settings, enter this information:
Relative URL For CSRF Get Request/servlet/odata
CSRF Token NameCSRF_NONCE
3. Under HTTP Connector Connection Settings, enter this information:
Base URL—The Windchill server that receives the Info*Engine Request from the ODataConnector. Use this format:
[https]://[Windchill Host]:[port]/[Windchill-web-app]/sslClientAuth
Relative URL/servlet/odata
Connection URL/servlet/WindchillGW/wt.httpgw.HTTPServer/ping
There’s no need to enter a user name and password.
4. Click Save.
Now, skip ahead to the section “Executing Info*Engine tasks”.
Fixed Authentication
If you have Fixed Authentication configured, follow the steps to configure the OData connector:
1. Under Generic Connector Connection Settings, for the Authentication Type, select Fixed.
2. Under CSRF Settings, enter this information:
Relative URL For CSRF Get Request/servlet/odata
CSRF Token NameCSRF_NONCE
3. Under HTTP Connector Connection Settings, enter this information:
User name—Your Windchill administrator user name
Password—Your Windchill administrator password
Base URL—The Windchill server that receives the Info*Engine Request from the ODataConnector. Use this format:
[https]://[Windchill Host]:[port]/[Windchill-web-app]
Relative URL/servlet/odata
4. Click Save. The OData connector is now configured to work in your Fixed Authentication environment.
Continue to the section “Executing Info*Engine tasks”.
Executing Info*Engine tasks
Now, execute the Info*Engine tasks with the service:
1. Click Services. The Services page opens.
2. For RefreshEndpointCache, click Execute. The Execute Service window opens.
3. Click Execute. You should receive the message: Success. Your service was successfully executed.
4. Click Done.
5. For InvokeIETask, click Execute.
6. In the Input window, add the following information in JSON format:
Task— The XML file for the Info*Engine task. The file is located here: <Windchill Installation>/<Windchill_Home>/tasks/.
* 
Make sure that the task is enabled for execution. To do this, verify that the following markup appears at the head of the XML file:
<%@page language="java" access="http"%>
Params—(Optional) A JSON array that contains name-value pairs to pass as a parameter to the Info*Engine task.
Example:
{
"Task": "wt/federation/delegates/windchill/QueryObjects.xml",
"Params": [
{ "Name": "type", "Value": "wt.part.WTPart" },
{ "Name": "where", "Value": "name=SOME_PART_NAME" }
]
}
7. Click Execute to start the Info*Engine task. The output of the service is in JSON format and contains the following properties:
@odata.context—The context URL for the payload.
Value—A JSON array that contains JSON objects with Groupname and Element properties.
8. To execute another Info*Engine task, repeat steps 1–7.
* 
The endpoints of the OData connector might not work as expected on ThingWorx Navigate, and as a result, you might need to make changes. For details and instructions on configuring OData services on Windchill data, see the Windchill REST Services User’s Guide.