Completing the DescribeObjects orchestration

To complete the DescribeObjects orchestration, you map outputs to input data, transform the object metadata to XML format to conform to the ci-connector-api.xsd file, then test the orchestration.

Procedure

  1. In the Studio Project toolbox tab, click on the DescribeObjects orchestration. The orchestration is displayed in the Studio workspace.
  2. In the orchestration, click on the Provide Service activity. The Map Outputs panel is displayed.
  3. In the Map Outputs panel, click on body. The node type window is displayed showing the input data.
  4. Add logic to the orchestration based on object and operation_name, as shown in Figure 1 to obtain the object metadata.
    Figure 1. DescribeObjects
    DescribeOjects.
  5. Transform the object metadata to XML format to conform to the ci-connector-api.xsd file described in Cast Iron CDK schema files. After the metadata is transformed to XML, your schema looks like this:
    < DescribeObjectResponse
    baseType = "sObject"
    baseTypeNS = "urn:sobject.partner.soap.sforce.com"
    name = "create"
    typeNS = "http://example.com/stockquote"
    xmlns = "http://www.approuter.com/schemas/cdk/api/"
    xmlns:con = "http://www.approuter.com/schemas/cdk/config/"
    xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" >
    < object
    label = "createInput"
    maxCount = "1"
    minCount = "1"
    name = "createInput"
    used = "true" >
    < con:field
    configurable = "true"
    label = "ObjectName"
    maxCount = "1"
    minCount = "1"
    name = "ObjectName"
    used = "true" >
    < con:type > string </ con:type >
    </ con:field >
    < con:field
    configurable = "true"
    label = "FirstName"
    maxCount = "1"
    minCount = "1"
    name = "FirstName"
    used = "true" >
    < con:type > string </ con:type >
    </ con:field >
    < con:field
    configurable = "true"
    label = "LastName"
    maxCount = "1"
    minCount = "1"
    name = "LastName"
    used = "true" >
    < con:type > string </ con:type >
    </ con:field >
    < con:field
    configurable = "true"
    label = "Phone"
    maxCount = "1"
    minCount = "1"
    name = "Phone"
    used = "true" >
    < con:type > string </ con:type >
    </ con:field >
    </ object >
    < responseObject
    label = "createOutput"
    maxCount = "1"
    minCount = "1"
    name = "createOutput"
    used = "true" >
    < con:field
    configurable = "true"
    label = "Id"
    maxCount = "1"
    minCount = "1"
    name = "Id"
    used = "true" >
    < con:type > string </ con:type >
    </ con:field >
    < con:field
    configurable = "true"
    label = "ObjectName"
    maxCount = "1"
    minCount = "1"
    name = "ObjectName"
    used = "true" >
    < con:type > string </ con:type >
    </ con:field >
    < con:field
    configurable = "true"
    label = "Status"
    maxCount = "1"
    minCount = "1"
    name = "Status"
    used = "true" >
    < con:type > string </ con:type >
    </ con:field >
    </ responseObject >
    </ DescribeObjectResponse >
    
  6. In the DescribeObjects orchestration, select the Send Reply activity. The Map Inputs panel is displayed.
  7. In the Map Inputs panel, map the generated XML to the DescribeObjectResponse parameter in the To Activity panel. You are now ready to test the orchestration.
  8. In the orchestration, right-click on the Provide Service activity. The Verify Activity menu is displayed.
  9. In the Verify Activity menu, select Invoke Service. The Invoke Service window is displayed.
  10. In the Invoke Service window, enter the header and body data and click Execute to start the test. To view the test activity, click the Show Response button.

Results

When the test is completed, the results are displayed in the Verify toolbox tab. If errors are present, make the necessary corrections, then re-run the unit test.

What to do next

In the next phase, you learn how to publish your connector project to a local repository.



Feedback | Notices


Timestamp icon Last updated: Thursday, 2 June 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.cdk.doc/cdk_completingdescribeobjects.html