0 votes
1.3k views
in Integrations by (120 points)

I am trying to generate an external service that you can use in a service flow using the following step by step : ( https://www.ibm.com/support/knowledgecenter/en/SSFPJS_8.6.0/com.ibm.wbpm.wle.editor.doc/topics/textsrvweb.html ) 

But the following errors occur:

com.ibm.bpm.service.discovery.exception.ws.discovery.NotAbleToUpdateBOException: CWXSD0007E: The NameValuePair business object couldn't be updated. To ensure the business object is updated, discover the external service from the process app or toolkit that contains the business object.

The problem is that the process application is using the System Data toolkit, in which the NameValuePair business object is defined and should not be changed. The external service that we are trying to generate from a URL uses the ibm scheme for that object.

 

1 Answer

0 votes
by (30.6k points)

That error appears when the external service generator (Swagger / OpenAPI import) tries to create business objects for the operations and one of them clashes with an existing object - here NameValuePair, which already exists in the System Data toolkit and cannot be overwritten by a generated type of the same name.

Fixes, in order of effort:

  1. Rename the schema in the Swagger file before the import: search for "NameValuePair" in definitions (Swagger 2) / components.schemas (OpenAPI 3) and every $ref that points to it, rename to SvcNameValuePair. Same for any other name that exists in your app or toolkits (Record, Map, Document, Error...).
  2. Generate into a dedicated toolkit that has no dependency on the toolkit holding the clashing object - the generator only checks the current project and its dependencies.
  3. Use the existing type: if the schema really is a name/value pair, delete the definition from the Swagger file and map the response to the System Data NameValuePair manually in the service flow (the generator leaves unmapped parts as ANY).
// Swagger 2 snippet after the rename
"definitions": {
  "SvcNameValuePair": { "type": "object", "properties": { "name": {"type": "string"}, "value": {"type": "string"} } },
  "Item": { "type": "object", "properties": { "attributes": { "type": "array", "items": { "$ref": "#/definitions/SvcNameValuePair" } } } }
}

Other generator rules worth knowing: property names must be valid JavaScript identifiers (no dashes - use x-ibm-name or rename), anonymous inline objects get generated names like Operation_200_response, and only application/json bodies are mapped.

References

Related questions

0 votes
2 answers 3.6k views
asked May 28, 2018 in BPD by anonymous
0 votes
1 answer 3.6k views
0 votes
1 answer 997 views
asked May 15, 2016 in REST API by anonymous
0 votes
1 answer 929 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
...