cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Info Engine Task

Harini
6-Contributor

Info Engine Task

Hi, 

I am new to Thingworx Navigate, 

Can any one help me how to create a service in Thingworx using InfoEngine which needs the creation of the object(Change request) in the windchill.

Both ThingWorx and Windchill are on my local machine.

 

 

 

 

ACCEPTED SOLUTION

Accepted Solutions
barko
16-Pearl
(To:Harini)

Info*Engine tasks are created in Windchill, and are supported by a different group of people than support Navigate. But, once you have an Info*Engine task, it can be accessed using the OData Connector in ThingWorx. Here are the steps from Knowledge Base Article 291231:

 

Configuring ODataConnector and Windchill to use Windchill Authentication

  

Clarifications:

Connector and connector-proxy are separate things with different purposes

Connector establishes connection endpoints

Connector works with IntegrationRuntime applet

IntegrationRuntime applet (IR) is configured using IntegrationRuntime-settings.json file

IntegrationRuntime-settings.json contains paths and passwords for keystore and truststore

IR provides ThingWorx signing certificate when connector authenticates to Windchill

Connector-proxy submits data request

Connector-proxy includes paths and passwords for keystore and truststore in configuration

Connector-proxy does not use IntegrationRuntime

ODataConnector does not require the use of a connector-proxy to request data

Remote user is set using a script as described in Configuration steps

 

Configuration steps:

ODataConnector:

Create and name a new thing based on the ODataConnector thing template

Select Configuration

Set Authentication Type to None

No need to fill out Username and Password

Fill the Base URL with: https://<Windchill Hostname>:<port>/Windchill/sslClientAuth

Fill Relative URL with: /servlet/odata/IE

Fill ConnectionURL with: /servlet/WindchillGW/wt.httpgw.HTTPServer/ping

Click Save.

Select Services

Edit GetCustomerHeaderParameters service

Add this script:

[

var sessionQueryParam = "wt.effectiveUid";

var Language = Resources["CurrentSessionInfo"].GetCurrentUserLanguage();

 

var params = {

   infoTableName : "InfoTable",

   dataShapeName : "NavigateCustomHeadersDataShape"

};

var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);

 

var CurrentUser = Resources["CurrentSessionInfo"].GetCurrentUser();

 

params = {

    tableName: "GenericConnectorConnectionSettings" /* STRING */

};

var configTable = me.GetConfigurationTable(params);

 

var row = configTable.getRow(0);

var authType = row.getStringValue("AuthenticationType");

 

if("None".equals(authType)) {

var camelHttpQuery = sessionQueryParam + "=" + CurrentUser;

row = {"Accept-Language" : Language, "CamelHttpQuery": camelHttpQuery };

} else {

row = {"Accept-Language" : Language };

}

 

result.AddRow(row);

]

Save service

Save Connector

 

View solution in original post

3 REPLIES 3
barko
16-Pearl
(To:Harini)

Info*Engine tasks are created in Windchill, and are supported by a different group of people than support Navigate. But, once you have an Info*Engine task, it can be accessed using the OData Connector in ThingWorx. Here are the steps from Knowledge Base Article 291231:

 

Configuring ODataConnector and Windchill to use Windchill Authentication

  

Clarifications:

Connector and connector-proxy are separate things with different purposes

Connector establishes connection endpoints

Connector works with IntegrationRuntime applet

IntegrationRuntime applet (IR) is configured using IntegrationRuntime-settings.json file

IntegrationRuntime-settings.json contains paths and passwords for keystore and truststore

IR provides ThingWorx signing certificate when connector authenticates to Windchill

Connector-proxy submits data request

Connector-proxy includes paths and passwords for keystore and truststore in configuration

Connector-proxy does not use IntegrationRuntime

ODataConnector does not require the use of a connector-proxy to request data

Remote user is set using a script as described in Configuration steps

 

Configuration steps:

ODataConnector:

Create and name a new thing based on the ODataConnector thing template

Select Configuration

Set Authentication Type to None

No need to fill out Username and Password

Fill the Base URL with: https://<Windchill Hostname>:<port>/Windchill/sslClientAuth

Fill Relative URL with: /servlet/odata/IE

Fill ConnectionURL with: /servlet/WindchillGW/wt.httpgw.HTTPServer/ping

Click Save.

Select Services

Edit GetCustomerHeaderParameters service

Add this script:

[

var sessionQueryParam = "wt.effectiveUid";

var Language = Resources["CurrentSessionInfo"].GetCurrentUserLanguage();

 

var params = {

   infoTableName : "InfoTable",

   dataShapeName : "NavigateCustomHeadersDataShape"

};

var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);

 

var CurrentUser = Resources["CurrentSessionInfo"].GetCurrentUser();

 

params = {

    tableName: "GenericConnectorConnectionSettings" /* STRING */

};

var configTable = me.GetConfigurationTable(params);

 

var row = configTable.getRow(0);

var authType = row.getStringValue("AuthenticationType");

 

if("None".equals(authType)) {

var camelHttpQuery = sessionQueryParam + "=" + CurrentUser;

row = {"Accept-Language" : Language, "CamelHttpQuery": camelHttpQuery };

} else {

row = {"Accept-Language" : Language };

}

 

result.AddRow(row);

]

Save service

Save Connector

 

Harini
6-Contributor
(To:barko)

Thank you.

slangley
23-Emerald II
(To:Harini)

Hi @Harini.

 

If the response provided by @barko provided a solution, please mark it as the Accepted Solution for others who may have the same question.

 

Regards.

 

--Sharon

Announcements

Top Tags