Forum

Daniel
Moderator
    Has successfully completed the online course Introduction
    Has successfully completed the online course Intermediate (200)
    Has successfully completed the online course Advanced (300)
    Has successfully completed the online course Basics (100)
3 years, 9 months ago #27858
Up
0
Down
::

Hey Nicole,

To map the value using an UI action you’ll need to set the correct datatype for your output parameter. Since the result of the connector is still a collection you’ll need to access the entry.

There are multiple ways to do this: you could change the output parameter of your connector to access the first entry in the collection. If an entry is not available this will result in an error instead of an empty object. Since you’re using the SELECT MAX(id) in your case this might do the trick.

However the better solution would be to capsule the capsule the connector call inside aserver side business object and check the result inside the script and return the first entry of the collection if it exists. This way you’ll be able to handle a fallback if the connector fails (for more information check the business object documentation).

In both cases you will need to create a data type for your result. You could create the datatype manually or use the “generate data type functionality” of the connector test dialog. The latter is the fastest way but you won’t be able to edit the data type manually later on.

When using the the “generate data type” functionality make sure to  copy the complete object that is inside the collection. Remove all available text in the output text area and paste the object. Afterwards press the “generate data type” button. (see attachment “datatype1”).

The name of the datatype will be presented in a dialog. Copy this name and in the output parameter of your business object set the data type to the newly created one.
By correctly setting the datatypes you’ll be able to map the different properties of an object in the process designer.

Hope this helps!

Best regards,
Dan

Attachments:
You must be logged in to view attached files.