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

thingworx flow install mathjs

mmancin
Contributor

thingworx flow install mathjs

Hi,

 

   

I am trying to install within nodejs module the mathjs library to be able to use the unit converter. I have a problem to install an external library. I followed the guide on the portal but i can't install the module and whitelist it.

 

At first, I install mathjs into ThingworxFlow folder

 

 

cd C:\<PROGRAM FILES>\ThingworxFlow
npm install mathjs

 

 

I run the command to download the settings file

 

 

flow-deploy settings download -f ‘.\settings.json' -t "https://<url>:443/Thingworx" -u 'Administrator' -p ‘pass' -c devtools -s default -l debug

 

 

I edit the whitelistExternal with "mathjs" and then upload

 

 

flow-deploy settings upload -f ‘.\settings.json' -t "https://<url>:443/Thingworx" -u 'Administrator' -p ‘pass' -c devtools -s default -l debug

 

 

mmancin_0-1613513001377.png

but from flow keeps telling me that it is not whitelisted. What can I do?

 

mmancin_1-1613513034142.png

 

 

6 REPLIES 6

Re: thingworx flow install mathjs

Hi @mmancin.

 

Please provide a link to the guide you are referring to and provide the version of ThingWorx/Flow you are running.

 

Did you get any errors when you ran the commands?  We can see in the statements you provided, you're using smart quotes in some cases, which could be causing an issue:

 

 

 

Regards.

 

--Sharon

 

Re: thingworx flow install mathjs

Hi, i follow this guide

 

https://support.ptc.com/help/thingworx/platform/r9/it/index.html#page/ThingWorx/Help/Integration_Or...

 

About smart quotes I think are copy/paste error on this forum because the command correctly run into powershell.

Re: thingworx flow install mathjs

Hi @mmancin.

 

And what version of ThingWorx and ThingWorx Flow are you running?

 

Regards.

 

--Sharon

Re: thingworx flow install mathjs

Thingworx Foundation and Flow both 9.1.0

Re: thingworx flow install mathjs

Hi @mmancin.

 

Could you please provide the settings.json with your changes?

 

Regards.

 

--Sharon

Re: thingworx flow install mathjs

{
  "PlatformSettingsConfig": {
    "BasicSettings": {
      "BackupStorage": "C://ThingworxBackupStorage",
      "DatabaseLogRetentionPolicy": 7,
      "EnableBackup": true,
      "EnableClusteredMode": false,
      "EnableSystemLogging": false,
      "EnableSSO": false,
      "FileRepositoryRoot": "C://ThingworxStorage",
      "HTTPRequestHeaderMaxLength": 2000,
      "HTTPRequestParameterMaxLength": 2000,
      "InternalAesCryptographicKeyLength": 128,
      "MetricsLoggingFrequency": 30,
      "MetricsLoggingLevel": "WARN",
      "SessionUpdateDelay": 60,
      "Storage": "C://ThingworxStorage",
      "ScriptTimeout": 30,
      "UserEditLockMaxWaitTime": 30000
    },
    "AdministratorUserSettings": {
      "InitialPassword": "XXX"
    },
    "ContentTypeSettings": {
      "supportedMediaEntityContentTypes": [
        "image/svg+xml",
        "image/png",
        "image/gif",
        "image/bmp",
        "image/jpeg",
        "application/pdf",
        "image/vnd.microsoft.icon"
      ]
    },
    "ExtensionPackageImportPolicy": {
      "importEnabled": true,
      "allowJarResources": true,
      "allowJavascriptResources": true,
      "allowCSSResources": true,
      "allowJSONResources": true,
      "allowWebAppResources": true,
      "allowEntities": true,
      "allowExtensibleEntities": true
    },
    "OrchestrationSettings": {
      "EnableOrchestration": true,
      "QueueHost": "XXX",
      "QueuePort": 5672,
      "QueueName": "256mb",
      "QueueUsername": "XXX",
      "QueuePassword": "encrypt.queue.password",
      "QueueVHost": "orchestration"
    }
  },
  "PersistenceProviderPackageConfigs": {
    "PostgresPersistenceProviderPackage": {
      "ConnectionInformation": {
        "jdbcUrl": "jdbc:postgresql://XXX:PPP/thingworx",
        "password": "XXX",
        "username": "XXX",
        "acquireIncrement": 5,
        "acquireRetryAttempts": 3,
        "acquireRetryDelay": 10000,
        "checkoutTimeout": 1000000,
        "driverClass": "org.postgresql.Driver",
        "fetchSize": 5000,
        "idleConnectionTestPeriod": 60,
        "initialPoolSize": 5,
        "maxConnectionAge": 0,
        "maxIdleTime": 0,
        "maxIdleTimeExcessConnections": 300,
        "maxPoolSize": 100,
        "maxStatements": 100,
        "minPoolSize": 5,
        "numHelperThreads": 8,
        "testConnectionOnCheckout": false,
        "unreturnedConnectionTimeout": 0
      },
      "StreamProcessorSettings": {
        "maximumBlockSize": 2500,
        "maximumQueueSize": 250000,
        "maximumWaitTime": 10000,
        "numberOfProcessingThreads": 5,
        "scanRate": 5,
        "sizeThreshold": 1000
      },
      "ValueStreamProcessorSettings": {
        "maximumBlockSize": 2500,
        "maximumQueueSize": 500000,
        "maximumWaitTime": 10000,
        "numberOfProcessingThreads": 5,
        "scanRate": 5,
        "sizeThreshold": 1000
      },
      "PersistentPropertyProcessorSettings": {
        "maximumBlockSize": 2500,
        "maximumWaitTime": 1000,
        "maximumQueueSize": 100000,
        "numberOfProcessingThreads": 20,
        "scanRate": 25,
        "sizeThreshold": 1000
      }
    }
  }
}
Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.