0 votes
603 views
in REST API by (30.6k points)

1 Answer

0 votes
by (30.6k points)

IBM BPM 8.5.7 brought REST in two directions:

1. Consuming REST services - the new External Service of type REST: import a Swagger 2.0 (JSON / YAML) definition (file or URL), pick the operations, and BPM generates business objects for the schemas and a service you call from a service flow with typed input / output; the host comes from a Server definition (Process App Settings > Servers, type REST server) so that every environment points to its own endpoint, with basic authentication or none; TLS through the cell truststore. Before 8.5.7 the only options were a Java integration or a script with Java's HTTP client (still valid for APIs without Swagger).

// after importing the Swagger "Customer API" with operation getCustomer
// service flow: External Service step "getCustomer" -> input tw.local.id, output tw.local.customer (generated BO "Customer")
tw.local.id = tw.local.order.customerId;
// (step)  ->  tw.local.customer.name, tw.local.customer.creditLimit
if (tw.local.customer.creditLimit < tw.local.order.total) tw.local.needsApproval = true;

2. Exposing BPM as REST - the BPM REST API (/rest/bpm/wle/v1) already existed; 8.5.7 extended it (task actions, search query API PUT /search/query, exposed items) and shipped the REST API tester (/bpmrest-ui) to try calls. Any service flow can be run through POST /rest/bpm/wle/v1/service/{id}?action=start, which is how external applications call BPM logic; there is no "publish my service as a REST resource with my own path" feature - that came much later (Workflow REST v2 in BAW 21 for standard resources; custom paths still need an API gateway in front).

Limitations of the 8.5.7 REST integration worth knowing: Swagger 2.0 only, JSON bodies only, no OAuth (basic or none - use a gateway or a Java integration for tokens), one Server per external service, and generated business object names taken from the Swagger definitions (rename clashes before importing - question 2992).

References

Related questions

0 votes
1 answer 1.3k views
0 votes
1 answer 2.2k views
0 votes
1 answer 882 views
0 votes
1 answer 1.4k views
0 votes
1 answer 2.2k views
asked Dec 22, 2016 in Interview Questions by Anil Singh (30.6k points)
0 votes
1 answer 574 views
0 votes
1 answer 1.6k views
0 votes
1 answer 1.6k views
0 votes
1 answer 762 views

723 questions

807 answers

98 comments

4.9k users

Join BPM Community Discord Channel

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...