Wednesday 2 August 2017

IBM BPM - Consuming RESTful Services using Swagger and YAML - Learning lessons

I'm just starting on a journey to use IBM BPM Standard ( actually I am using BPM Advanced on the IBM Cloud, but am only currently leveraging the BPMN engine ) to consume Decision Services hosted on IBM Operational Decision Manager.

I've done this before with BPM Advanced ( SCA/BPEL ) using WSDL, but this time around I'm using Process Designer, Integration Services, Human Services, Coaches etc.

In addition, I'm accessing the ODM Decision Service via a RESTful service, using Swagger and YAML to describe the service, rather than the more typical SOAP-over-HTTP using WSDL.

To that end, I've exported the Decision Service as a YAML document, from the Decision Server, using the Hosted Transparent Decision Service (HTDS) capability : -
using the Download button, which results in a file - EstimateInstallRuleAppEstimateInstallRulesetDecisionService-2.yaml.

Having done that, I then attempted to create a new External Service in BPM: -


and retrieved the previously downloaded YAML: -

However, when I clicked Next, I saw this: -


with this error: -


specifically: -

CWXSD0006E: Response '200' is invalid. Details: Object 'Estimate' has an invalid property definition 'days'. Data type 'integer' with format 'int64' is not supported.

To quickly overcome this, I hand-edited the YAML, and changed the format from: -

format: "int64"

to: -

format: "int32"

and tried again.

This time around, it worked.

Looking into this further, I found this: -


• Type integer with format int64 is not supported. If the value of the integer is greater than the supported integer number, you will encounter issues. For information about the range that is supported for the integer type, see Variable types in Process Designer.

which helps.

No comments:

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...