Breadcrumbs

Commons xUML Library: GlobalOps

GlobalOps is a collection of functionality to be used in Designer projects. In PAS Builder projects, these are not needed.

GlobalOps.png

BaseTypeEcho and BaseTypeNull

When modeling Activity diagrams in Designer, you cannot assign literals to out pins → use BaseTypeEcho in these cases, feeding your literal as input and connect the out pin of the echo operation your activities' out pin. The below screenshot illustrates the usage.

Also, you cannot provide NULL as literal input → use BaseTypeNull in these cases.

image-2023-7-24_11-45-38.png

RESTOps

REST support in the designer is for from being complete. You cannot access the request/response context at all, and also the OpenAPI importer ignores all response definitions other than the default. So even if the OpenAPI spec explicitly mentions a possible HTTP return code of 400 with a specific structured response object, the xUML runtime will raise an error complaining about receiving an unexpected response.

getRestHttpRequest() : Request and getRestHttpResponse() : Response

RESTOps make the REST context (request/response) available in Designer (see Request and Response types in the class diagram, both are from Base Components:AddOns:REST). You need these if you want to access the raw content from the request, or if you want to set a specific HTTP return code along with a different response Object.

isExpectedResult(AdapterResponse, String, String)

A convenience operation to test whether a REST adapter call in fact returned an expected result. Provide the adapterResponse of the REST adapter call, a String containing expected HTTP return codes (e.g. 400,500), and the expected content type (e.g. application/json). The result will be a simple true/false. If true, you can then transcode and parse the adapterResponse.body Blob into the structure you expected. The screenshot above shows an example usage.

ServiceContextOps

This class exposes some global Action Script macros as operation calls. They are all documented in the Integration(Bridge) section of the PAS online documentation.

UrlOps

Allows to compose/decompose a URL from/into its parts.