A dacsout type object represents an XML integration package whose structure conforms to that of one of the dacstype schemas that the workflow script references.
Remarks
You can access the referenced integration message schemas in your script using the
messages
variable.
Creating and populating an integration message
The workflow scripts in the samples reference outgoing integration messages. To try the
following samples out for yourself, you'll need to upload an intconf.xml
file that defines an outbound integration endpoint and the
integration messages and schema that they accept, so that these workflow scripts can
reference them. You'll also need to create the outbound endpoint on your Cloud instance that
match the name specified in the intconf.xml
file.
Create a dacsout object using the dacstype.New()
method, and populate it by assigning values to its
elements and attributes, as determined by its schema. The elements defined in a
dacstype
schema map to objects in workflow scripts. Attributes, content,
and child elements defined for an element in a schema map to fields of the object, which you
can get and set using dot-notation (or the index operator in the case of list
objects).
Elements that are marked optional
in a
schema start out with a null
value.
To assign a value to an element that is marked optional in the schema, you need to first use
the
element-name
.
name-of-optional-element
New()
method to create an instance of it within the dacstype object, and give its
name
field a valid value. Once the element instance is set up, you can go
ahead and assign values to its other fields.
An integration message schema that defines an optional child element
A workflow script that assigns value to the attribute of the optional child element
Download the speedy.fls.xml
trigger form for the script
below.
Populating lists in an integration message
To populate a list type dacsout object element with simple (textnode only) child elements,
use the list.Add()
method.
To populate a list type dacsout object with complex child elements, use the
element
.AddNew()
method, available on
this type of element only.
An integration message schema that defines a complex child element
A workflow script that assigns value to the complex child element
Download the
happy.fls.xml
trigger form for the script
below.
Sending an outbound integration message
Send populated dacsout objects via the Mobilengine Cloud to an integrated system using the
dacs.Send()
method. See the relevant tutorial for details on outbound integration.
Members
-
dacsout.Send() Send an integration message through a previously set up integration endpoint.