Important Note

This space contains files and text snippets that are used throughout the Scheer PAS documentation.
This content is not meant to be read independently from the rest of the documentation.

Oops, it seems that you need to place a table or a macro generating a table within the Table Filter macro.

The table is being loaded. Please wait for a bit ...

ChapterNameExcerptUsage
Array Operationsarrays_of_arrays

Arrays of arrays are not supported by the Designer.

Array Operationscreating_arrays

You can create arrays using the create statement (see action script example below):

create anArray;
append "Hello World!" to anArray;

Most of the time the xUML Runtime will create the array implicitly on appending the first item. There is one exception to this rule, though: Arrays that contain array elements having a complex type with multiplicity.

Let's assume you have an array of complex type ArrayElement and this complex type has a property subArray with multiplicity 0..*.

  • What you can do, if subArray is NULL:

    set array1[0].subArray = anotherArray;

    The reference subArray is changed to point to anotherArray.

  • What you can't do, if subArray is NULL:

    append "something" to array1[0].subArray;

    In this case (get statement on the right side of a statement), the Runtime will throw a get error for array1[0].subArray.

Blob Operationsblob_definition

A blob represents base64-encoded arbitrary binary data.

DateTime Operationscalculate_dates

This is calculated e.g. as follows:

  1. 31.01.2017 + 1 month = 31.02.2017
  2. The resulting date 31.02.2017 is normalized to 03.03.2017.

DateTime Operationstimeticks

Within this context TimeTicks are UNIX timestamps.
Unix time, or POSIX time, is a system for describing points in time: it is the number of seconds elapsed since midnight UTC of January 1, 1970, not counting leap seconds. It is widely used not only on Unix-like operating systems but also in many other computing systems.

Integer Operationsboolean_definition

Boolean values represent binary-valued logic (true, false).

Integer Operationsdatetime_definition

CCYY-MM-DDThh:mm:ss[.sss] [Z|[+|-]hh:mm]

Whereas "Z" stands for the time zone: Coordinated Universal Time (UTC). The W3C value space of DateTime is closely related to the dates and times described in ISO 8601.

Integer Operationsfloat_definition

A float corresponds to the IEEE single-precision 32-bit floating-point type.

Lexical representation: [white spaces] [+|-][nnn][.nnn][e|E[+|-]nnn] (where white spaces are any tab or space character; nnn may be any number of digits)

Integer Operationsinteger_definition

The W3C defines integers as "decimal", which represents arbitrary precision decimal numbers.

Integer Operationsstring_definition

A string is a set of finite-length sequences of a character set (the Bridge uses UTF-8 internally).

JSONwriteTypeDiscriminator

Use writeTypeDiscriminator to suppress the generation of xUML type properties ("e2e:type") to the generated JSON. If this option is true, the Runtime will write the original xUML type to the generated JSON in form of "e2e:type": "<name of the original xUML type>" if the type being serialized does not match the expected metadata.

Types

list_type_strings

Find below a list of all Base Types of the Designer together with their type string as returned by typeOf() and staticTypeOf().

Bridge Base TypeType String
Anyurn:Base_Types.Any
Arrayurn:Base_Types.Array
Bloburn:Base_Types.Blob
Booleanurn:Base_Types.Boolean
DateTimeurn:Base_Types.DateTime
Floaturn:Base_Types.Float
Integerurn:Base_Types.Integer
Stringurn:Base_Types.String

Other, e.g. model specific, types can be referenced via their path in the service panel, e.g. a class Customer that has been defined in a package Service/Classes/Customer would have the following type string: "urn:Service.Classes.Customer".

XML MappingclassToXML_compose_options

xmlToClass() offers an optional parameter of type XMLComposeOptions.

Its attributes are:

AttributeTypeDescriptionExample
prologArray of StringThe string values are inserted right before the root element of the generated document. This mechanism can be used to insert processing instructions (e.g. DTD and Schema references), comments, entities or any other prolog you may think of. However, be aware that using prolog arrays makes it easy to generate non-well-formed documents.
timezoneStringTime zone string as specified on Time Zones. The timezone is used to print dateTime expressions. If no timezone is given, UTC is used.
If " local" is used, the date/time is printed relative to the local timezone of the server, e.g. 2012-10-01T12:36:47.0+02:00 (the timezone of the server is UTC+02:00).

"Australia/Melbourne", "CET", "Etc/GMT+10"

dateFormatStringStringA format string to be used when printing DateTime values as xs:date (e.g. %F to print a date without timezone).
The allowed formats can be found on Time Zones. If nothing is defined, the XSD standard is used.
%F
encodingStringEncoding of the target xml. Default encoding is UTF-8.
For a list of possible encodings refer to Charset Definitions.
"UTF-8"
rootNameString

Name of the generated XML root element. Use this tagged value to override the default behavior.

TXTRAW01
rootnamespaceStringName of the namespace of the generated XML root element.

XML MappingclassToXML_mapping_rules

By default the following mapping rules apply:

  • Class attributes are mapped to XML attributes.
  • Association ends are mapped to XML elements.

These default rules can be overridden by using the stereotypes XMLElementXMLAttribute, and XMLCharacters on  class properties.
More about these mapping rules, stereotypes and tagged values (e.g. for number and date & time formatting) can be found on Controlling the XML Serialization With Stereotypes.

XML Mapping

classToXML_parse_options

The following table lists all available XML options. Default values used when an option is not explicitly set are written in bold. The Runtime uses the Xerces parser internally, so you can find more information for all options on the Xerces home page by following the link in the Xerces column.

Parse OptionDescriptionXerces LinkValues

validation

Controls validation.

Xerces Documentation true

Report all validation errors. The document must specify a grammar in this case.

This option overrides nonvalidatingLoadExternalDTD.

falseDo not report validation errors (default).
If the document specifies a grammar, that grammar might be parsed but no validation of the document contents will be performed.

validationDynamic

Validate the document if a grammar is specified.Xerces DocumentationtrueThe parser will validate the document only if a grammar is specified. (validation must be true).
falseValidation is determined by the state of the validation option (default).

validationSchema

Control schema support.

Xerces DocumentationtrueEnable the parser's schema support (default).
To use this option, namespaces must also be turned on.
falseDisable the parser's schema support.

validationSchemaFullChecking

Enable checking the schema grammar itself for additional errors that are time-consuming or memory intensive. It does not affect the level of checking performed on document instances that use schema grammars.

Xerces DocumentationtrueEnable full schema constraint checking, including checks that may be time-consuming or memory intensive. Currently, particle unique attribution constraint checking and particle derivation restriction checking are controlled by this option.
falseDisable full schema constraint checking (default).

nonvalidatingLoadExternalDTD

Controls loading an external DTD. This feature is ignored and DTD is always loaded when the option validation is true.

Xerces DocumentationtrueLoad external DTD.
falseIgnore external DTD completely (default).

standardURIConformant

Controls standard URI checks.

Xerces Documentation
trueForce standard URI conformance. Malformed URIs will be rejected.
falseDo not force standard URI conformance (default).

validationIdentityConstraintChecking

Controls entity constraint checking.Xerces Documentation
trueEnable identity constraint checking (default).
falseDisable identity constraint checking.

validationSchemaSkip-DTDValidation

Controls usage of DTDs.Xerces Documentation
trueWhen validationSchema is true the parser will ignore the DTD, except for entities.
falseThe parser will not ignore DTDs when validating (default).

disableDefaultEntityResolution

Controls entity resolution.Xerces Documentation
trueThe parser will not attempt to resolve the entity if the Runtime can't find it.
falseThe parser will attempt to resolve the entity on its own if the Runtime can't find it (default).

namespaces

Controls namespace processing.

If the validation option is set to true, then the document must contain a grammar that supports the use of namespaces.

Xerces Documentation
truePerform namespace processing (default).
falseDo not perform namespace processing.

namespacePrefixes

Controls reporting of namespace prefixes.Xerces Documentation
trueReport the original prefixed names and attributes used for namespace declarations.
falseDo not report attributes used for namespace declarations, and optionally do not report original prefixed names (default).

externalSchemaLocation

The XML Schema Recommendation explicitly states that the inclusion of schemaLocation/nonamespaceSchemaLocation attributes in the instance document is only a hint; it does not mandate that these attributes must be used to locate schemas.

Similar situation happens to <import> element in schema documents. This property allows the user to specify a list of schemas to use. If the targetnamespace of a schema specified using this method matches the targetnamespace of a schema occurring in the instance document in schemaLocation attribute, or if the targetnamespace matches the namespace attribute of <import> element, the schema specified by the user using this property will be used (i.e., the schemaLocation attribute in the instance document or on the <import> element will be effectively ignored).

Xerces DocumentationThe syntax is the same as for schemaLocation attributes in instance documents: e.g, " http://www.acme.com file_name.xsd ". The user can specify more than one XML Schema in the list.

externalNonamespaceSchemaLocation

The XML Schema Recommendation explicitly states that the inclusion of schemaLocation/nonamespaceSchemaLocation attributes in the instance document is only a hint; it does not mandate that these attributes must be used to locate schemas. This property allows the user to specify the no target namespace XML Schema Location externally. If specified, the instance document's nonamespaceSchemaLocation attribute will be effectively ignored.

Xerces DocumentationThe syntax is the same as for the nonamespaceSchemaLocation attribute that may occur in an instance document: e.g." file_name.xsd ".

scannerName

This property allows the user to specify the name of the XMLScanner to use for scanning XML documents.

Xerces Documentation
The recognized scanner names are:
WFXMLScannerA scanner that performs well-formedness checking only.
DGXMLScannerA scanner that handles XML documents with DTD grammar information.
SGXMLScannerA scanner that handles XML documents with XML schema grammar information.
IGXMLScannerA scanner that handles XML documents with DTD or/and XML schema grammar information (default).
entityExpansionLimitTo mitigate an entity expansion attack (aka "XML bomb" or "the billion laughs" attack) you use this tagged value to limit entity expansion to the specified level.


Any integer, no default.

If using this tagged value, provide at least  value 1. Otherwise the standard XML entities will not be parsed.

XML Mapping

classToXML_parse_options_example

xmlToClass() offers an optional parameter of type XMLParseOptions. It has various attributes to control schema and DTD location and validation:

Be aware that by default, schemas are parsed, but documents are not validated against them. Set the validation attribute to true if you want to enforce validation beyond well-formedness.
For example, assume that you want to validate your document against a schema called CustomerData.xsd having the namespace http://acme.com/customer. In this case, you need to set the following parse options:

OptionValue
externalSchemaLocation http://acme.com/customer
validation true

If the XML document refers a schema file (.xsd) with filename (and optional path), it is sufficient to upload the file to the Integration (Bridge) as a resource. It will be automatically loaded from there.

If the XML document refers no schema, or you would like to provide another than the referred one, use the XMLParseOptions structure and set externalSchemaLocation (or externalNonamespaceSchemaLocation) accordingly. As above, missing or relative paths will be redirected to the resource folder of the Integration (Bridge). The same applies also for validating against DTDs. Be aware that validation is turned off by default (see option validation below).

Number Operations

locale

Optional variable or object attribute having the type Basic Components.Basic Behavior.NumbersLocale.

This parameter can be used to define the following properties:

Locale SettingDescriptionExample
negativeSignCharacters used to signify negative values.-
positiveSignCharacters used to signify positive values.+
thousandsSeparatorCharacters used to separate units of thousand.,
decimalPointCharacters used to separate the decimal places..
currencySymbolCharacters used to indicate the currency of the value.$

Default values are given by the system locales.

  • No labels