Skip to main content
InterSystems Supply Chain Orchestrator 2024.1
AskMe (beta)
Loading icon

Using the Inbound Adapter for Cloud Storage

Within a production, you can include custom business services that use the inbound cloud adapter to retrieve data from cloud storage. To do so, create one or more business service classes as described here. Then add them to your production and configure them.

Overall Behavior of the Adapter

The cloud inbound adapter, EnsLib.CloudStorage.InboundAdapterOpens in a new tab, provides settings that you can use to specify the location of the cloud storage to examine, as well as settings to authenticate to the service provider. When included in a business service, the adapter periodically polls for available resources. Then at each polling interval:

  1. If the adapter finds input from its configured data source, it constructs an input object to hold the data, and it calls the internal ProcessInput() method of the business service, passing the object to it. The input object depends upon the adapter.

  2. The internal ProcessInput() method of the business service receives the input object. It then performs basic production tasks such as maintaining internal information as needed by all business services. You do not customize or override this method, which your business service class inherits.

  3. The ProcessInput() method then calls your custom OnProcessInput() method, passing the input object. The requirements for this method are described in Implementing the OnProcessInput() Method.

  4. Your custom OnProcessInput() method examines the input object and sends it to other hosts in the production (or creates and sends new messages based on the input object).

Creating a Business Service

To use the cloud inbound adapter, create a business service class as follows:

Implementing the OnProcessInput() Method

Within your business service class, your OnProcessInput() method should have the following signature:

Method OnProcessInput(pInput As EnsLib.CloudStorage.InboundInput, 
                     Output pOutput As %RegisteredObject) As %Status {
}

Where:

  • pInput is the input object created by the adapter, using data retrieved from cloud storage.

  • pOutput is the generic output argument required in the method signature. You can use a more specific message class in the method signature.

The OnProcessInput() method should do the following:

  1. Examine the input object (pInput) and decide how to use it. The Content property of this object is a stream that connains the data retrieved from the cloud storage.

  2. Create an instance of the request message, which will be the message that your business service sends.

    For information on creating message classes, see Defining Messages.

  3. For the request message, set its properties as appropriate, using values in the input.

  4. Call a suitable method of the business service to send the request to some destination within the production. Specifically, call SendRequestSync(), SendRequestAsync(), or (less common) SendDeferredResponse(). For details, see Sending Request Messages.

    Each of these methods returns a status (specifically, an instance of %StatusOpens in a new tab).

  5. Make sure that you set the output argument (pOutput). Typically you set this equal to the response message that you have received. This step is required.

  6. Return an appropriate status. This step is required.

Properties of the Input Object

The input object is an instance of EnsLib.CloudStorage.InboundInputOpens in a new tab, which has the following properties:

  • Name is the name of cloud storage blob.

  • Meta contains the metadata associated with the cloud storage blob.

  • Content is a stream that contains the data from cloud storage.

Your OnProcessInput() method should examine these properties and use them as needed for your business case.

FeedbackOpens in a new tab