Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WDESIGNER and version 23.1
Div
Classe2e-refDiv

Otp
Floatingfalse

Rp

Stereotype Attributes

REST Alias

Multiexcerpt
MultiExcerptNameRESTAlias
Attribute
(Name of Setting)
DescriptionAllowed Values
Protocol
(protocol)
Specify here the protocol through which the REST service is accessible.http, https
Port
(port)
Specify here the port through which the REST service is accessible.a valid port
Host
(host)
Specify here the host running the REST service.a valid host
Base Path
(basePath)

Specify here the base path of the REST service.

Info

Please note that the base path differs whether you want to access a Designer service from the outside of PAS or from the inside. When you trigger Designer services within the platform, use the part of the path starting with /rest/....

a valid path, e.g

  • /Idea_Management/rest/process/Idea_management if you want to access a Designer service from outside PAS

  • /rest/process/Idea_management if you want to access a Designer service from inside PAS
Ignore Http Errors
(ignoreHttpErrors)

Specify here whether you want the REST adapter to throw an exception upon receiving an HTTP error code >= 400.

trueDo not throw an exception upon receiving an HTTP error code >= 400 (default).
falseThrow an exception upon receiving an HTTP error code >= 400.
Additional Request Headers
(additionalHeaders)
This attribute can contain a list of additional headers in form of name/value pairs.Valid format is: <name>:<value>, e.g. API-Key:acme . Separate multiple headers with a comma.
HTTP Header Role Definitions for Requests
(requestHttpHeaderRoles)

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNamerequestHttpHeaderRoles
PageWithExcerptINTERNAL:_designer_excerpts_stereotypes

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNamerequestHttpHeaderRoles_adapter
PageWithExcerptINTERNAL:_designer_excerpts_stereotypes

client_host

Provide the client host in a header <http header name>instead of X-Sender-Host.

client_service

Provide the client service in a header <http header name> instead of X-Sender-Service.

correlation_id

Provide the correlation ID in a header <http header name> instead of X-Request-Id.

transaction_id

Provide the transaction ID in a header <http header name> instead of X-Transaction-Id.

passthrough

Pass a present header <http header name> to the called service.

passthrough=<request header name>

Pass an present header <request header name> to the called service under the name of <http header name>.
This is equivalent to renaming a header.
Algorithm
(digestAlgorithm)
Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNamedigestAlgorithm
PageWithExcerptINTERNAL:_designer_excerpts_stereotypes
shouldDisplayInlineCommentsInIncludesfalse
NoneNo header generated (default).

MD5

Generate header using MD5 algorithm.

SHA

Generate header using SHA algorithm.

SHA-1

Generate header using SHA-1 algorithm.

SHA-256

Generate header using SHA-256 algorithm.
SHA-512Generate header using SHA-512 algorithm.
Accepted Count of Redirects to Follow
(followRedirects)
Specify here the maximum number of redirects to follow. Default value is 0 (no redirects).any integer, 0 (default)
cURL Options
(options)

Specify native cURL options as listed in Setting cURL Options on the URL Adapter.

Use one of the following syntax rules:

  • values separated by ',' in one line
  • values separated by ' ' in one line
  • list of attributes

Json Keep Null Values
(jsonKeepNulls)
When jsonKeepNulls is true, attributes of the REST parameter having NULL values will be provided with the REST call, otherwise they will be left out completely (see also chapter NULL Values).trueRender attributes with NULL values to the REST call.
falseLeave out attributes with NULL values in the REST call (default).
Json Compact Format
(jsonCompact)
When jsonCompact is true, the JSON composer will generate compact JSON, otherwise it will generate pretty JSON.trueGenerate compact JSON (default).
falseGenerate pretty JSON.
User
(user)
Specify credentials here if the called REST service needs basic authentication.Valid format is <user>/<password>, e.g. david.stringer/pAsWoRd456
Proxy Settings (if the called REST service is accessed via a proxy)
Proxy URL
(proxyURL)
Specify the URL of the proxy server.See CURLOPT_PROXY.
Proxy User
(proxyUser)
Specify the proxy credentials.See CURLOPT_PROXYUSERPWD, format is <user>/<password>, e.g. david.stringer/pAsWoRd456
Proxy Type
(proxyType)
Specify the proxy type.See CURLOPT_PROXYTYPE.
SSL Settings (if the called REST service uses SSL)
SSL CA Info
(sslCAInfo)
Specify a file name containing additional certificates for the connection verification (e.g. additional root CAs).See CURLOPT_CAINFO.
SSL Certificate File
(sslCertificateFile)
Specify a fle name containing the client certificate.See CURLOPT_SSLCERT.
SSL Certificate Type
(sslCertificateType)
Specify the type of the certificate.See CURLOPT_SSLCERTTYPE.
SSL Private Key File
(sslPrivateKeyFile)
Specify a file name containing the private key.See CURLOPT_SSLKEY.
SSL Private Key Password
(sslPrivateKeyPassword)
Specify the password for the private key.See CURLOPT_KEYPASSWD.
SSL Private Key Type
(sslPrivateKeyType)
Specify the type of the key.See CURLOPT_SSLKEYTYPE.
SSL Verify Host
(sslVerifyHost)
Specify whether to verify the host information form the SSL connection.See CURLOPT_SSL_VERIFYHOST.
SSL Verify Peer
(sslVerifyPeer)
Specify whether to verify the peer information from the SSL connection.See CURLOPT_SSL_VERIFYPEER.

REST Adapter

Multiexcerpt
MultiExcerptNameRESTAdapter
Attribute
(Name of Setting)
DescriptionAllowed Values
Alias
(alias)
Specify the REST alias the adapter should connect to.a valid REST alias
Digest Algorithm
(digestAlgorithm)
Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNamedigestAlgorithm
PageWithExcerptINTERNAL:_designer_excerpts_stereotypes
shouldDisplayInlineCommentsInIncludesfalse
NoneNo header generated (default).

MD5

Generate header using MD5 algorithm.

SHA

Generate header using SHA algorithm.

SHA-1

Generate header using SHA-1 algorithm.

SHA-256

Generate header using SHA-256 algorithm.
SHA-512Generate header using SHA-512  algorithm.

REST API

This stereotype defines a package as a REST port. It has no additional attributes.

REST Resource

Multiexcerpt include
MultiExcerptNameRESTResource
PageWithExcerptREST
shouldDisplayInlineCommentsInIncludesfalse

REST Operation

Multiexcerpt
MultiExcerptNameREST
Attribute
(Name of Setting)
DescriptionAllowed Values
Http Method
(httpMethod)

Provide the HTTP method of this REST method should respond to.

a valid HTTP methodGET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
none
  • method name, if it is one of: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS (with optional trailing '/')
  • GET otherwise
Relative Path
(relativePath)
Defines the path of the REST method in relation to the parent resource.noneThe name of the REST method will be used.
any valid stringThe given name will be used. The relative path may also contain variables (REST path parameters, specified as :<variable name>) and can be segmented like e.g. /date=:<a date variable> .
Is Verbatim Path
(isVerbatimPath)
Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameisVerbatimPath
PageWithExcerptINTERNAL:_designer_excerpts_stereotypes
shouldDisplayInlineCommentsInIncludesfalse
truePath should be treated as verbatim, path normalization is disabled.
false (default)Path should be URL encoded.
Blob Body Content Type
(blobBodyContentType)

Specify a default content type for Blob response parameters from this endpoint. This must be a list of valid Accept headers as defined in RFC 7231.
Refer to Handling Blobs in the REST Interface for a deeper explanation and some examples.

Info

This attribute must be left unset if no Blob output parameters are used. In future versions, the effect of this attribute may be extended to other contexts as well.


a list of valid media rangese.g. application/msexcel
Default is application/octet-stream if not specified.
Reject Other Response Content Types
(rejectOtherResponseContentTypes)

The xUML Runtime performs a verification of the content-type header for REST responses. Specify whether to return an error (HTTP 406, not acceptable) on responses with a content type that does not conform with the content types specified in Blob Body Content Type.
Refer to Handling Blobs in the REST Interface for a deeper explanation and some examples.


true
  • Reject to perform adapter call if the header "content-type" does not match the values listed in Blob Body Content Type (default).
  • Exception: RESTLM/48: Request content type not declared as accepted by the service
falsePerform the adapter call in spite of content-type header mismatch, and let the service handle this.
Accepted Request Content Types
(acceptedRequestContentType)

Provide a list of content types this REST endpoint accepts. This must be a list of valid Accept headers as defined in RFC 7231.
Refer to Handling Blobs in the REST Interface for a deeper explanation and some examples.

Info

This attribute must be left unset if no Blob output parameters are used. In future versions, the effect of this attribute may be extended to other contexts as well.

a list of valid media rangese.g. application/xhtml+xml
Default is application/octet-stream if not specified.
Reject Other Request Content Types
(rejectOtherRequestContentTypes)

Specify whether to return an error on requests with a content type that does not conform with the content types specified in Accepted Request Content Type.
Refer to Handling Blobs in the REST Interface for a deeper explanation and some examples.

true
  • Reject to perform adapter call if the header "accept" does not match the values

    listed in Accepted Request Content Type (default).

  • Exception: Set "accept" header does not accept any of declared response content types
falsePerform the adapter call in spite of accept header mismatch and let the service handle this.

REST Parameter

Multiexcerpt include
MultiExcerptNameRESTParameter
PageWithExcerptREST

REST Error

The stereotype REST Error is used on a class to mark it as REST error class. Each REST port has a error class assigned that, in case of error, contains additional information. You can get this information using something like

Code Block
create error;
set error = adapterResponse.responseObject;

if error is an object of the type indicated by this stereotype.

REST Adapter Parameters

Multiexcerpt
MultiExcerptNameRESTAdapterParameters
NameTypeDirectionDescription
requestOptions
RequestOptionsinUse this parameter to configure the REST Adapter dynamically and overwrite the settings from the component diagram.
responseAnyoutThis parameter holds the adapter output and is of that type that is given back by the called REST service.

REST Content Types

With the REST Adapter, the xUML Runtime can handle JSON or XML as content types. The Runtime will parse either response content (JSON or XML) to a response object automatically.
You do not need to set any headers. If no headers are set, the Runtime will use JSON as a default format and set Accept header to application/json,text/json,application/xml;q=0.9,text/xml;q=0.9,*/*;q=0.8.

Regarding response parsing, the xUML Runtime will process REST responses as follows:

  • If the Content-Type header of the response is JSON or XML, respective format will be used (regardless what is specified in the Accept header).
  • If the Content-Type header of the response is not set, the Runtime will assume that the content matches the Accept header of the request. If no Accept header has been specified, JSON is the fallback.
  • In case of unsupported Content-Type, JSON is the fallback.

REST Parameter Types

Request

AttributeTypeDescriptionValues/Example
methodHTTPMethodHTTP method used in call.GET
queryStringStringQuery string, if provided with the call.status=in%20progress
queryParametersArray of ParameterAll query parameters as an array of Parameter classes containing name/value pairs.
bodyBlobBody of the HTTP request.
pathStringPath to the REST resource./support/supportcases/
pathParametersMapAll REST parameters as a map.
httpHeaderMapMap of Entry

Header information as a map. The map contains arrays of header value strings whereas the header name is the key of the map.

  • Header names are lowercase and treated case insensitive.
  • Multiple headers with the same name are treated as arrays.

Refer to HTTP Header Support for more information on the standard xUML HTTP headers.


Response

AttributeTypeDescriptionValues/Example
headersArray of HeaderFieldAll HTTP response header fields as an array of HeaderField classes containing name/value pairs.
statusCodeIntegerThe resulting HTTP status code. If not set explicitly using this object, the service returns 200 if no exception occurred, or 500 otherwise.404
errorObjectAnyObject of the type defined with stereotype <<RESTError>>.

RequestOptions

Multiexcerpt
MultiExcerptNameRequestOptions
shouldDisplayInlineCommentsInIncludesfalse
AttributeTypeDescriptionAllowed Values/Example
additionalHeadersArray of HeaderFieldAll REST request header fields as an array of HeaderField classes containing name/value pairs.
optionsArray of Option

Specify native cURL options as listed in Setting cURL Options on the URL Adapter .

Use one of the following syntax rules:

  • values separated by ',' in one line
  • values separated by ' ' in one line
  • list of tagged values

sslSSLUse this parameter to supply SSL information.
proxyProxyUse this parameter to supply necessary proxy information.
additionalQueryParametersArray of Parameter Use this parameter to provide additional query parameters to the REST service call.
followRedirectsIntegerSpecify here the maximum number of redirects to follow.any integer
basicAuthAuthenticationThis parameter provides an object of type Authentication containing the user and the password.
basePathStringOverwrite here the base path of the REST service.

a valid path, e.g. /support

hostStringOverwrite here the host running the REST service that has been defined in the component diagram.

a valid host, e.g. scheer-acme.com

portIntegerOverwrite here the port through which the REST service is accessible.a valid port number, e.g. 12345
protocol
StringOverwrite here the protocol through which the REST service is accessible.httpUse the HTTP protocol to access the service (default).
httpsUse the HTTPS protocol to access the service.
ignoreHttpErrors
BooleanIf true,  Default value is true.trueHTTP error codes >= 400 will not cause an exception in the service (default). This implies, that the response body is accessible even if HTTP errors occur.
false
HTTP error codes >= 400 will cause an exception in the service.
jsonComposerOptionsComposerOptionsUse this parameter to specify JSON composer options on the REST call. You can use these options to e.g. overwrite jsonKeepNulls from the REST alias.Valid composer options as described below.

AdapterResponse

AttributeTypeDescriptionValues/Example
httpStatusIntegerHTTP status code of the adapter call.500
bodyBlobHTTP body of HTTP response.
responseObjectAny

Response Object of the REST adapter call.

  • If the adapter had an error, the responseObject is an <<RESTError>> class. It could be the default error class or a specific error class dependent on the <<RESTResponseDefinition>> dependencies and the HTTP status code.
  • If the adapter call had no error, the responseObject is the same as the response output parameter.

httpHeaderMapMap of EntryHeader information as a map. The map contains arrays of header value strings whereas the header name is the key of the map.
  • Header names are lowercase and treated case insensitive.
  • Multiple headers with the same name are treated as arrays.

Refer to HTTP Header Support for more information on the standard xUML HTTP headers.


Request and Response Types

Multiexcerpt
MultiExcerptNameRequest_and_Response_Types
shouldDisplayInlineCommentsInIncludesfalse
REST TypeAttributeTypeDescriptionAllowed Values/Example
AuthenticationusernameStringSpecify a username.
passwordStringSpecify a password.

Anchor
Certificate
Certificate
Certificate

fileStringProvide name of a certificate file.
typeStringSpecify the type of the certificate file.One of PEM or DER.

Anchor
ComposerOptions
ComposerOptions
ComposerOptions

jsonKeepNullsBooleanSpecify the handling of NULL values.trueKeep NULL values during JSON composing.
falseDo not serialize NULL values during JSON composing.
jsonCompactBooleanSpecify the generated JSON format.trueSerialize to JSON without pretty-printing.
falseProduce a pretty JSON.
jsonWriteTypeDiscriminatorBooleanSpecify whether to write type information to the generated JSON.trueWrite a type discriminator to the generated JSON.
falseDo not write a type discriminator to the generated JSON.
EntrykeyStringSpecify the key of a map entry.
valueArray of AnyProvide a list of values of the map entry. The dynamic type for httpHeaderMap is String.
HTTPMethod
enumerationCan be one of the listed HTTP methods.DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT
HeaderFieldnameStringSpecify the name of the header field.
valueStringProvide a header value.

Anchor
Ke<
Ke<
Key



fileStringSpecify the name of the file that contains the private key.
typeStringSpecify the type of the private key.
passwordStringSpecify the password for the private key.

Anchor
Option
Option
Option

nameStringSpecify the name of the cURL option.
valueStringProvide a value.
ParameternameStringSpecify the name of the parameter.
valueStringProvide a value.

Anchor
Proxy
Proxy
Proxy

urlStringSpecify a URL to the proxy server.A valid URL.
typeStringSpecify a proxy typeHTTPThe proxy is a HTTP proxy.
SOCKS5The proxy is a SOCKS5 proxy.
authenticationAuthenticationSee above.

Anchor
SSL
SSL
SSL

verifyPeerStringSpecify whether to verify the peer information from the SSL connection.trueVerify the peer information (default).
falseDo not verify the peer information.
verifyHostStringSpecify whether to verify the host information from the SSL connection.OnVerify the host information (default).
OffDo not verify the host information.
ExistenceOnly check for existence of the host.
caInfoStringSpecify the name of the file that contains additional certificates for the connection verification.
certificateCertificateSpecify the certificate information (see above).
keyKeySpecify the private key information (see above).