Home

Limitations invoking a REST API service in IBM BPM

Introduction
In this article, I am going to explain some of the limitations using Invoke restful service using script task in IBM BPM. Discover a REST service from a local OpenAPI specification (formerly known as Swagger) and generate an external service based on the discovered REST service. You can then use the external service in a service flow to invoke the REST service. By using this method we have some limitations. Below are the some of the limitations.
Overview
In any of the following circumstances, you require invoke the service by using JavaScript.
Ø  To use a REST service, for which the OpenAPI specification contains objects that have no properties.
Ø  To use a REST service that specifies file types. You must specify the content-type multipart/form-data.
Ø  To use mime types other than application/json. Note that a parameter of type string and format binary in combination with a mime type other than application/json is not supported. At run time, the invocation is rejected with an exception.
Ø  To use the property enum for data types boolean, decimal, integer, string + format=date, and string + format=date-time.
The following specifications are not supported.
Ø  Operations of the PATCH method cannot be invoked.
Ø  Property allOf is not supported.
Ø  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.
Note: If you want to invoke a REST service that returns int64 format integers, you can use JavaScript to invoke the REST service and then parse the string result that is returned in the content property of the BPMRESTResponse object.
The following specifications are ignored.
Ø  For the HTTP methods GET, HEAD, OPTIONS, and DELETE, any request body is ignored.
Ø  Property default is ignored for all types.
Ø  Properties maxLength and minLength for type string are ignored for parameters.
Ø  Property multipleOf for types integer and decimal is ignored.
Ø  Property allowEmtpyValue is ignored.
Ø  Business object properties maxProperties, minProperties, and additionalProperties are ignored.
Ø  Business object array properties maxItems and minItems are ignored.
Ø  Formats email, password and hostname for type string are ignored.
Conclusion
To overcome the above limitations IBM BPM is provided JavaScript to invoke the restful services. This will solve our issues as of now. I hope IBM is going to overcome these issues in coming releases of IBM BPM.
Download
S. No
File Name
Size
Download
1
Limitations invoking a REST API Service in IBM BPM.pdf
1.0 MB

Comments