6 Managing IoT Orchestrations

This chapter contains the following topics:

6.1 Using Server Manager to Manage IoT Orchestrations

Server Manager provides AIS Server settings for managing IoT orchestrations. These settings include:

  • Full path to XML files. Enter the location of IoT orchestrations for processing by the IoT Orchestrator. Make sure the path contains forward slashes (/). If the host is a Windows machine, replace the backslashes with forward slashes.

  • Enable Admin Service. Click this option to activate the AIS Administration Service, a service on the AIS Server that enables you to delete AIS Server cache after modifying an orchestration. See Managing IoT Orchestration Modifications Using the AIS Administration Service in this guide for more information.

  • AdminServiceUserList. Enter a comma delimited list of EnterpriseOne user IDs for users allowed to run the AIS Administration Service. For example:

    AdminServiceUserList=USR10,USR22, USR12

6.2 Managing the Life Cycle of IoT Orchestrations

Oracle recommends setting up different instances of the AIS Server: an instance for designing and testing IoT orchestrations and another instance for production. This enables you to test your orchestrations before making them available for runtime.

In Server Manager, for each AIS Server instance, make sure to include the path to the orchestration XML files in the Full path to XML files field.

When your testing is complete, you can simply copy and paste the orchestration XML files from the location identified in the test instance to the location used for production.

6.3 Managing IoT Orchestration Modifications Using the AIS Administration Service

The AIS Server caches all orchestration XML files processed by the IoT Orchestrator. If you modify any orchestration XML files currently in use, you must clear the AIS Server cache for the modified files to be used. Clearing the cache forces the AIS Server to reload files from disk to cache, which is required for modifications to take effect.

Note:

Clearing the cache is not necessary to run new orchestration XML files.

You can clear the cache using either of the following methods:

  • Restarting the AIS Server. This method is not recommended because:

    • If the IoT Orchestrator is currently running an orchestration, it will result in invalid processing of that orchestration.

    • It results in server downtime, which might affect other applications that use the AIS Server.

  • Using the AIS Administration Service to clear the AIS Server cache (recommended). The AIS Administration Service is a REST service on the AIS Server that is exposed like any other service on the AIS Server.

Regardless of the method you use, Oracle recommends that you clear the cache only on an AIS Server instance used for developing and testing orchestrations. Either method clears the XML file cache for all orchestrations; you cannot clear the cache for individual orchestrations.

Using the AIS Administration Service to Clear Cache

Before you can use the AIS Administrator Service, you have to activate the AIS Admin Service option in the AIS Server instance's General settings in Server Manager.

You can run the service simply by placing a URL in a browser with valid EnterpriseOne credentials. The AIS Administrator Service takes an EnterpriseOne username and password as input. You can invoke the service using either a GET or a POST HTTP method.

The URI is:

http://<ais_server>:<port>//jderest/adminservice

The AIS Administrator Service is able to take credentials in several forms.

For the GET call, you can either use Basic Authorization or you can provide the username and password as URL parameters, for example:

http://<ais_server>:<port>/jderest/adminservice?username=<userid>&password=<pwd>

For the POST operation you can use Basic Authorization, provide username and password as parameters, or provide username and password as JSON input, for example:

{
        "username":"user",
        "password":"pwd"
} 

If the service succeeds, the response looks like this:

{"message":"All XML File Caches and X-Ref/Whitelist Caches have been cleared and refreshed.","timeStamp":"2015-04-30:14.26.58"}

If the service fails, these are the possible reasons:

  • Invalid credentials, which is indicated by the following response:

    {"message":"Error: Authorization Failure Server returned HTTP response code: 403 for URL: http://<jas_server>:<port>/jde/FormServiceRequest","exception":"com.oracle.e1.rest.session.E1LoginException","timeStamp":"2015-04-30:14.28.59"}

  • Service disabled in settings, which is indicated by the following response:

    {"message":"Error: Admin Service is disabled in configuration. No action has been taken. ","timeStamp":"2015-04-30:14.31.41"}

  • User has not been added to the AIS Server's AdminServiceUserList setting in Server Manager, which is indicated by the following response:

    {"message":"User is not authorized to use the Admin Service","timeStamp":"2015-07-07:14.23.25"}