The input for an invoke, reply, or people activity can be constructed within the Input (or Data) tab of the activity's
Properties
view. Use the Input (or Data) tab of the invoke, reply or people activity as follows:
The input for an invoke or reply activity can be constructed within the Input (or Data) tab of the activity's
Properties
view. Use the Input (or Data) tab of the invoke or reply as follows:
Assignment Type
Single Variable
. Select a variable if no input preparation is desired via an assign activity. Select an existing process variable or select New Variable. The variable must be of the operation's input message type, or, if the operation requires only one part, the variable's type can be the element type of the one part.
XPaths
. Select XPaths if you want to use a table to map from data within existing variables or a literal to the contents of the input message. The table uses XPath expressions that allow you to select nodes from a variable to assign to the input variable as well as compute values (strings, numbers, or Boolean values) from the content of variable. See
Adding XPaths
below.
XQuery
. Select XQuery if you want to fill each input message part with a single query written in the XQuery expression language. This language allows you to create a query that looks like an XML document, but where pieces of the document are constructed using a superset of the XPath expression syntax. It supplements XPath with a SQL-like "FLWOR expression" (FOR, LET, WHERE, ORDER BY, and RETURN) for performing joins. See
Adding XQuery
below.
For example XPath and XQuery expressions, see
Selecting XPath or XQuery for Expression Building
.
Tip:
If you want to use Javascript to prepare some or all of an input message, create an assign activity instead of using the Input tab. Each copy operation in an assign can use a different expression language.
Adding XPaths
On the Input (or Data) tab of an invoke, reply, or people activity, ensure that the Assignment Type is XPaths.
On the Input (or Data) tab of an invoke or reply activity, ensure that the Assignment Type is XPaths.
In the table, select
Add
to populate the b
column.
In the To Path column, select the child node of the part, if needed.
In the E/L column, select the From type: Expression or Literal.
In the From column, select the
Dialog (...) Button
at the end of the table cell. For a literal, select
Generate
and notice that the literal XML document is generated for you based on the type needed for the chosen To Part and To Path. To add an expression, fill in the Expression text box. For a shortcut, see
Using Content Assist
.
For more information on expression languages, see
Using the Expression Builder
.
The following is an example of a literal mapping:
Optionally, in
Copy Attachments
, select a variable that can have attachments that you want to copy to or from. Note that you must copy all attachments. If you want only some attachments, you can add an Assign activity before the activity. See
Adding an Attachment
for details.
When you use XPaths, a temporary variable called
parameters
is created to contain the parts. For details, see
Viewing Container Variables
below.
Adding XQuery
For easy XQuery development, see
Writing XQuery Functions
.
On the Input (or Data) tab of an invoke, reply, or people activity, ensure that the Assignment Type is XQuery.
Notice that a XML template is generated for the message part. If desired, after editing the document, you can regenerate the template.
Fill in the XQuery expressions as desired for each element. Optionally, select
Builder
to open the Query Builder to insert expressions or functions into the query.
The following is an example of an XQuery mapping.
Optionally, copy attachments, as described above in the XPaths discussion.
Viewing Container Variables
Iif you use XPaths or XQuery, a container variable is added to the Process Variables view, called
parameters
. Similarly, if you are copying attachments to the input variable, you will see the container variable,
attachmentCopyResult
. These variables are hidden by default since they are used only temporarily at runtime to process parts of a full variable. Select