A dream comes true; message mapping in a BPM and the pain to understand the "usage" assignment...Finally, off the bucketlist
Hi there “Process Automation” fans,
Welcome to a new installment of “Process Automation” tips.
It’s freezing weather (snowing here in the Netherlands now during writing) which opens the opportunity to dive into a recommended (from a college) exercise we all need to eXperience once. It’s all about the different “usage” assignments between source and target in the world of message mapping in de BPM. WHAT? Yes, sometimes an image makes more sense:
Does it ring a bell now? You probably ask yourself every time: How does the output change based on the selection? In that case, continue your reading, and use this post as future reference when you ask yourself that question again…
Also read section “Business process modeling reference > Parameter types” of the OPA advanced development guide for “documented” guidance; This post is a practical guidance with simple examples.
Let’s get right into it…
To start with this exercise, we first need to define what we need and what we’re going to do. We need at least a BPM template; This can be a simple one-activity BPM to play with. My BPM is called bpm_dummy with a one-activity noop. It’s a long-lived process with full monitoring for a proper messagemap view in the PIM…An easy task to create on your own.
To assess our usage assignments, we require some input XML. If you start an instance (with <F12> in the BPM designer tool) of the bpm_dummy BPM, you can watch the messagemap of this instance in the PIM with a result like this (it’s showing the BPM instance properties):
For the examples below, we do a mapping from “Source” to “Target” (in the messagemap) to a specific bpm:data element in the process specific messages with this XML structure:
1 2 3
<bpm:data> <bpm:hello/> </bpm:data>
This is a mapping example we use for our reference examples below:
The first assignment puts a hard-coded value world in the sub-element to evaluate the outcomes; The second assignment is what we change every time for the difference usage assignments below.
These are the steps for each XML result part per “usage” assignment you see passing by below:
Update the usage assignment
Publish the BPM
Start a debug session with <Ctrl>+<F12>
Step through the noop activity
Check the output result on the bpm:data element
So far so good, it’s time to dive into the different usage assignments…
Section “ADD”
Note upfront: This will “add” the selection in our target node bpm:data. So, when other elements are in place in bpm:data, this will add another one!
👉 Add.Select
1 2 3 4 5 6 7
<!-- Adds node content into data Source expression: instance:instanceProperties/instance:processName/text() --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello>bpms/bpm_dummy </data>
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<!-- Adds node itself into data Source expression: instance:instanceProperties/instance:processName --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <processName xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName> </data>
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<!-- Adds node itself into data; The first one of the multi select with * (NOT all nodes!) Source expression: instance:instanceProperties/* --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <processName xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName> </data>
👉 Add.Select Multiple
1 2 3 4 5 6 7 8 9
<!-- Adds nodes content into data; You would expect multiple concatenated values (an extra priority 3), but this only works for nodes! Source expression: instance:instanceProperties/*[self::instance:processName or self::instance:priority]/text() --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello>bpms/bpm_dummy </data>
<!-- Adds nodes itself into data Source expression: instance:instanceProperties/*[self::instance:processName or self::instance:priority] --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <processName xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName> <priority xmlns="http://schemas.cordys.com/bpm/instance/1.0" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">3</priority> </data>
👉 Add.Fixed Value
1 2 3 4 5 6 7
<!-- Adds plain text into data Source fixed value: hello world --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello>hello world </data>
1 2 3 4 5 6 7 8
<!-- Adds plain text into data (even XML!) Source fixed value: <root>text</root> --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <root>text</root> </data>
👉 Add.Expression
1 2 3 4 5 6 7 8 9
<!-- Adds nodes content into data; multiple concatenated values (watch the extra priority 3)! Source expression: instance:instanceProperties/*[self::instance:processName or self::instance:priority]/text() --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello>bpms/bpm_dummy3 </data>
<!-- Adds child node (not parent!) itself into data (we only have one; so, first and last is the same!) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <activity xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:bpm="http://schemas.cordys.com/default" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns="http://schemas.cordys.com/bpm/instance/1.0"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF52-B3BE53DBD3FD"startTime="1769715825643"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"> <monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0" /> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="add"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren" /> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
👉 Add.XML Structure
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<!-- Adds XML text into data (plain text will give a publish error!) Source fixed XML value: <root xmlns:sm="http://www.w3.org/2005/07/scxml">text</root> --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <root xmlns="http://schemas.cordys.com/bpm/instance/1.0" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sm="http://www.w3.org/2005/07/scxml">text</root> </data>
👉 Add.Select with Target NS
1 2 3 4 5 6 7 8
<!-- Adds node content into data forcing into target message namespace (however, it's only text!) Source: instance:instanceProperties/instance:processName/text() --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello>bpms/bpm_dummy </data>
1 2 3 4 5 6 7 8
<!-- Adds node itself into data forcing into target message namespace Source: instance:instanceProperties/instance:processName --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <processNamexmlns="http://schemas.cordys.com/default">bpms/bpm_dummy</processName> </data>
👉 Add.Select Multiple with Target NS
1 2 3 4 5 6 7 8 9 10
<!-- Adds nodes itself into data forcing into target message namespace Source expression: instance:instanceProperties/*[self::instance:processName or self::instance:priority] --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <processNamexmlns="http://schemas.cordys.com/default">bpms/bpm_dummy</processName> <priorityxmlns="http://schemas.cordys.com/default">3</priority> </data>
👉 Add.Children with Target NS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<!-- Adds child nodes (not parent!) itself into data forcing into target message namespace (we only have one in the example) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <activity xmlns="http://schemas.cordys.com/default"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF53-0BBAFC8113FD"startTime="1769716415615"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"> <monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0" /> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="add"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"useTargetNS="true" /> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
👉 Add.First Child with Target NS and Add.Last Child with Target NS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<!-- Adds child node (not parent!) itself into data forcing into target message namespace (we only have one; so, first and last is the same!) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <activity xmlns="http://schemas.cordys.com/default"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF53-0BBAFC8113FD"startTime="1769716415615"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"> <monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0" /> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="add"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"useTargetNS="true" /> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
👉 Add.XML Structure with Target NS
1 2 3 4 5 6 7 8 9 10
<!-- Adds XML text into data forcing into target message namespace (plain text will give a publish error!) Source fixed XML value: <root xmlns:sm="http://www.w3.org/2005/07/scxml">text</root> --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <rootxmlns="http://schemas.cordys.com/default">text</root> </data>
Also busted: the assignments “with Target NS” do provide a cleaner XML output!
👉 Add.Attribute nil="true"
1 2 3 4 5 6 7
<!-- Stamps node as empty with extra 'nil' attribute (I removed the "hello" assignment to make it work!) --> <data xmlns="http://schemas.cordys.com/default" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:nil="true" />
Section “ADD XML AS STRING”
Note upfront: This will “add” the content (as XML string) in our target node bpm:data. So, when other elements are in place in bpm:data, this will add another one!
👉 Add XML as String.Select
1 2 3 4 5 6 7
<!-- Adds node content into data (similar to a regular Add.Select) Source expression: instance:instanceProperties/instance:processName/text() --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello>bpms/bpm_dummy </data>
1 2 3 4 5 6 7 8 9 10
<!-- Adds node itself into data (as pure result in String-format; The difference is in the namespacing!) Source expression: instance:instanceProperties/instance:processName --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <processName xmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName> </data>
1 2 3 4 5 6 7 8 9 10
<!-- Adds node itself into data; The first one of the multi select with * (NOT all nodes!) in pure String-format Source expression: instance:instanceProperties/* --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <processName xmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName> </data>
👉 Add XML as String.Fixed Value
1 2 3 4 5 6 7
<!-- Adds plain text into data Source fixed value: hello world --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello>hello world </data>
1 2 3 4 5 6 7 8
<!-- Adds plain text into data (even XML as pure String-format!) Source fixed value: <root>text</root> --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <root>text</root> </data>
<!-- Add child nodes (not parent!) itself into data as pure String-format (we only have one in the example) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <activity xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:bpm="http://schemas.cordys.com/default" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns="http://schemas.cordys.com/bpm/instance/1.0"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF53-D9CEA8DDD3FD"startTime="1769717799903"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"><monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0"/> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="addAsData"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"/> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
👉 Add XML as String.First Child and Add XML as String.Last Child
<!-- Add child node (not parent!) itself into data as pure String-format (we only have one; so, first and last is the same!) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <activity xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:bpm="http://schemas.cordys.com/default" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns="http://schemas.cordys.com/bpm/instance/1.0"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF53-D9CEA8DDD3FD"startTime="1769717799903"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"><monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0"/> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="addAsData"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"/> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
👉 Add XML as String.Select with Target NS
1 2 3 4 5 6 7 8
<!-- Adds node content into data forcing into target message namespace as pure String-format (however, it's only text!) Source: instance:instanceProperties/instance:processName/text() --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello>bpms/bpm_dummy </data>
1 2 3 4 5 6 7 8 9
<!-- Adds node itself into data forcing into target message namespace as pure String-format Source: instance:instanceProperties/instance:processName --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <processNamexmlns="http://schemas.cordys.com/default">bpms/bpm_dummy</processName> </data>
👉 Add XML as String.Children with Target NS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<!-- Adds child nodes (not parent!) itself into data forcing into target message namespace as pure String-format (we only have one in the example) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <activity xmlns="http://schemas.cordys.com/default"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF54-14CA5D7E93FD"startTime="1769718199155"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"><monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0"/> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="addAsData"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"useTargetNS="true"/> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
👉 Add XML as String.First Child with Target NS and Add XML as String.Last Child with Target NS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<!-- Adds child node (not parent!) itself into data forcing into target message namespace as pure String-format (we only have one; so, first and last is the same!) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <hello>world</hello> <activity xmlns="http://schemas.cordys.com/default"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF54-14CA5D7E93FD"startTime="1769718199155"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"><monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0"/> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="addAsData"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"useTargetNS="true"/> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
Section “REPLACE WITH”
Note upfront: This will “replace” our target node bpm:data itself. So, when other elements are in place in bpm:data, this will override it all!
👉 Replace With.Select
1 2 3 4 5
<!-- Node content replaced over data Source expression: instance:instanceProperties/instance:processName/text() --> bpms/bpm_dummy
1 2 3 4 5 6 7 8 9 10 11
<!-- Node itself replaced over data Source expression: instance:instanceProperties/instance:processName --> <processName xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName>
1 2 3 4 5 6 7 8 9 10 11 12
<!-- Node itself replaced over data; The first one of the multi select with * (NOT all nodes!) Source expression: instance:instanceProperties/* --> <processName xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName>
👉 Replace With.Select Multiple
1 2 3 4 5 6 7
<!-- Nodes content replaced over data; You would expect multiple concatenated values (an extra priority 3), but this only works for nodes! Source expression: instance:instanceProperties/*[self::instance:processName or self::instance:priority]/text() --> bpms/bpm_dummy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<!-- Nodes itself replaced over data (note the different element order) Source expression: instance:instanceProperties/*[self::instance:processName or self::instance:priority] --> <priority xmlns="http://schemas.cordys.com/bpm/instance/1.0" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">3</priority> <processName xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName>
👉 Replace With.Fixed Value
1 2 3 4 5
<!-- Plain text replaced over data Source fixed value: hello world --> hello world
1 2 3 4 5 6 7 8 9 10 11
<!-- Plain text replaced over data (even XML including namespaces!) Source fixed value: <root>text</root> --> <root xmlns="http://schemas.cordys.com/bpm/instance/1.0" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">text</root>
👉 Replace With.Expression
1 2 3 4 5 6 7
<!-- Nodes content replaced over data; multiple concatenated values (watch the extra priority 3 and the order)! Source expression: instance:instanceProperties/*[self::instance:processName or self::instance:priority]/text() --> 3bpms/bpm_dummy
<!-- Nodes itself replaced over data (same result as 'Add.Select Multiple' with different order)! Source expression: instance:instanceProperties/*[self::instance:processName or self::instance:priority] --> <priority xmlns="http://schemas.cordys.com/bpm/instance/1.0" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">3</priority> <processName xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName>
👉 Replace With.Children
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<!-- Child nodes (not parent!) itself replaced over data (we only have one in the example) Source expression: instance:instanceProperties/instance:activityInfo --> <activity xmlns="http://schemas.cordys.com/default"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF54-14CA5D7E93FD"startTime="1769718199155"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"><monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0"/> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="addAsData"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"useTargetNS="true"/> </preassignment> <activityStatus>DEBUG</activityStatus> </activity>
👉 Replace With.First Child and Replace With.Last Child
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<!-- Child node (not parent!) itself replaced over data (we only have one; so, first and last is the same!) Source expression: instance:instanceProperties/instance:activityInfo --> <activity xmlns="http://schemas.cordys.com/default"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF54-14CA5D7E93FD"startTime="1769718199155"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"><monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0"/> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="addAsData"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"useTargetNS="true"/> </preassignment> <activityStatus>DEBUG</activityStatus> </activity>
👉 Replace With.XML Structure
1 2 3 4 5 6 7 8 9 10 11 12
<!-- XML text replaced over data (plain text will give a publish error!) Source fixed XML value: <root xmlns:sm="http://www.w3.org/2005/07/scxml">text</root> --> <root xmlns="http://schemas.cordys.com/bpm/instance/1.0" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sm="http://www.w3.org/2005/07/scxml">text</root>
👉 Replace With.Select with Target NS
1 2 3 4 5 6
<!-- Node content replaced over data forcing into target message namespace (however, it's only text!) Source: instance:instanceProperties/instance:processName/text() --> bpms/bpm_dummy
1 2 3 4 5 6 7 8 9 10 11 12
<!-- Node itself replaced over data forcing into target message namespace (introducing namespaces again!) Source: instance:instanceProperties/instance:processName --> <processName xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/default">bpms/bpm_dummy</processName>
<!-- Child node (not parent!) itself replaced over data forcing into target message namespace (introducing namespaces again; we only have one; so, first and last is the same!) Source expression: instance:instanceProperties/instance:activityInfo --> <activity xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/default"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF54-9E8B6A6253FD"startTime="1769719113805"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"> <monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0" /> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="replace"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"useTargetNS="true" /> </preassignment> <activityStatus>DEBUG</activityStatus> </activity>
👉 Replace With.XML Structure with Target NS
1 2 3 4 5 6 7 8 9 10 11 12 13
<!-- XML text replaced over data forcing into target message namespace (introducing namespaces again; plain text will give a publish error!) Source fixed XML value: <root xmlns:sm="http://www.w3.org/2005/07/scxml">text</root> --> <root xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/default">text</root>
Fascinating: the assignments “with Target NS” for a replacement do NOT give a cleaner XML output; It’s introducing namespaces (which sounds logical to me)!
Section “REPLACE CONTENT WITH”
Note upfront: This will “replace” the content in our target node bpm:data. So, when other elements are in place in bpm:data, this will override it all!
👉 Replace Content With.Select
1 2 3 4 5
<!-- Node content replaced in data Source expression: instance:instanceProperties/instance:processName/text() --> <dataxmlns="http://schemas.cordys.com/default">bpms/bpm_dummy</data>
1 2 3 4 5 6 7 8 9 10 11 12 13
<!-- Node itself replace in data Source expression: instance:instanceProperties/instance:processName --> <dataxmlns="http://schemas.cordys.com/default"> <processName xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName> </data>
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<!-- Node itself replace in data; The first one of the multi select with * (NOT all nodes!) Source expression: instance:instanceProperties/* --> <dataxmlns="http://schemas.cordys.com/default"> <processName xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName> </data>
👉 Replace Content With.Select Multiple
1 2 3 4 5 6 7
<!-- Nodes content replaced in data; You would expect multiple concatenated values (an extra priority 3), but this only works for nodes! Source expression: instance:instanceProperties/*[self::instance:processName or self::instance:priority]/text() --> <dataxmlns="http://schemas.cordys.com/default">bpms/bpm_dummy</data>
<!-- Child node (not parent!) itself replaced in data (we only have one; so, first and last is the same!) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <activity xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:bpm="http://schemas.cordys.com/default" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns="http://schemas.cordys.com/bpm/instance/1.0"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF55-1791795F93FD"startTime="1769719931033"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"> <monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0" /> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="replaceAllChildren"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren" /> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
👉 Replace Content With.XML Structure
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<!-- XML text replaced in data (plain text will give a publish error!) Source fixed XML value: <root xmlns:sm="http://www.w3.org/2005/07/scxml">text</root> --> <dataxmlns="http://schemas.cordys.com/default"> <root xmlns="http://schemas.cordys.com/bpm/instance/1.0" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sm="http://www.w3.org/2005/07/scxml">text</root> </data>
👉 Replace Content With.Select with Target NS
1 2 3 4 5 6
<!-- Node content replaced in data forcing into target message namespace (however, it's only text!) Source: instance:instanceProperties/instance:processName/text() --> <dataxmlns="http://schemas.cordys.com/default">bpms/bpm_dummy</data>
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<!-- Node itself replaced in data forcing into target message namespace (introducing namespaces again!) Source: instance:instanceProperties/instance:processName --> <dataxmlns="http://schemas.cordys.com/default"> <processName xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/default">bpms/bpm_dummy</processName> </data>
👉 Replace Content With.Select Multiple with Target NS
<!-- Nodes itself replaced in data forcing into target message namespace (introducing namespaces again and different order!) Source expression: instance:instanceProperties/*[self::instance:processName or self::instance:priority] --> <dataxmlns="http://schemas.cordys.com/default"> <priority xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/default">3</priority> <processName xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:bpm="http://schemas.cordys.com/default" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/default">bpms/bpm_dummy</processName> </data>
👉 Replace Content With.Children with Target NS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<!-- Child nodes (not parent!) itself replaced in data forcing into target message namespace (introducing namespaces again; we only have one in the example) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <activityid="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF54-9E8B6A6253FD"startTime="1769719113805"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"> <monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0" /> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="replace"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"useTargetNS="true" /> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
👉 Replace Content With.First Child with Target NS and Replace Content With.Last Child with Target NS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<!-- Child node (not parent!) itself replaced in data forcing into target message namespace (introducing namespaces again; we only have one; so, first and last is the same!) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <activityid="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF54-9E8B6A6253FD"startTime="1769719113805"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"> <monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0" /> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="replace"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"useTargetNS="true" /> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
👉 Replace Content With.XML Structure with Target NS
1 2 3 4 5 6 7 8 9
<!-- XML text replaced in data forcing into target message namespace (introducing namespaces again; plain text will give a publish error!) Source fixed XML value: <root xmlns:sm="http://www.w3.org/2005/07/scxml">text</root> --> <dataxmlns="http://schemas.cordys.com/default"> <root>text</root> </data>
Section “REPLACE XML AS STRING”
Note upfront: This will “replace” the content (as XML string) in our target node bpm:data. So, when other elements are in place in bpm:data, this will override it all!
👉 Replace XML as String.Select
1 2 3 4 5
<!-- Node content replaced in data as pure String-format Source expression: instance:instanceProperties/instance:processName/text() --> <dataxmlns="http://schemas.cordys.com/default">bpms/bpm_dummy</data>
1 2 3 4 5 6 7
<!-- Node itself replace in data as pure String-format Source expression: instance:instanceProperties/instance:processName --> <dataxmlns="http://schemas.cordys.com/default"> <processNamexmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName> </data>
1 2 3 4 5 6 7 8
<!-- Node itself replace in data as pure String-format; The first one of the multi select with * (NOT all nodes!) Source expression: instance:instanceProperties/* --> <dataxmlns="http://schemas.cordys.com/default"> <processNamexmlns="http://schemas.cordys.com/bpm/instance/1.0">bpms/bpm_dummy</processName> </data>
👉 Replace XML as String.Fixed Value
1 2 3 4 5
<!-- Plain text replaced in data as pure String-format Source fixed value: hello world --> <dataxmlns="http://schemas.cordys.com/default">hello world</data>
1 2 3 4 5 6 7
<!-- Plain text replaced over data as pure String-format (even XML!) Source fixed value: <root>text</root> --> <dataxmlns="http://schemas.cordys.com/default"> <root>text</root> </data>
<!-- Child nodes (not parent!) itself replaced in data as pure String-format (we only have one in the example) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <activity xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:bpm="http://schemas.cordys.com/default" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns="http://schemas.cordys.com/bpm/instance/1.0"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF55-C6FB5EA993FD"startTime="1769721105038"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"> <monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0"/> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="replaceChildrenWithData"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"/> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
👉 Replace XML as String.First Child and Replace XML as String.Last Child
<!-- Child node (not parent!) itself replaced in data as pure String-format (we only have one; so, first and last is the same!) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <activity xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://schemas.cordys.com/casemanagement/1.0" xmlns:bpm="http://schemas.cordys.com/default" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns="http://schemas.cordys.com/bpm/instance/1.0"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF55-C6FB5EA993FD"startTime="1769721105038"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"> <monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0"/> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="replaceChildrenWithData"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"/> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
👉 Replace XML as String.Select with Target NS
1 2 3 4 5 6
<!-- Node content replaced in data as pure String-format forcing into target message namespace (however, it's only text!) Source: instance:instanceProperties/instance:processName/text() --> <dataxmlns="http://schemas.cordys.com/default">bpms/bpm_dummy</data>
1 2 3 4 5 6 7 8
<!-- Node itself replaced in data as pure String-format forcing into target message namespace (introducing namespaces again!) Source: instance:instanceProperties/instance:processName --> <dataxmlns="http://schemas.cordys.com/default"> <processNamexmlns="http://schemas.cordys.com/default">bpms/bpm_dummy</processName> </data>
👉 Replace XML as String.Children with Target NS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<!-- Child nodes (not parent!) itself replaced in data as pure String-format forcing into target message namespace (introducing namespaces again; we only have one in the example) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <activityxmlns="http://schemas.cordys.com/default"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF56-33897E6413FD"startTime="1769721840995"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"> <monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0"/> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="replaceChildrenWithData"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"useTargetNS="true"/> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
👉 Replace XML as String.First Child with Target NS and Replace XML as String.Last Child with Target NS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<!-- Child node (not parent!) itself replaced in data as pure String-format forcing into target message namespace (introducing namespaces again; we only have one; so, first and last is the same!) Source expression: instance:instanceProperties/instance:activityInfo --> <dataxmlns="http://schemas.cordys.com/default"> <activityxmlns="http://schemas.cordys.com/default"id="o_2"name="noop"type="EMPTY"instanceID="00505601-2BAA-A1F0-BF56-33897E6413FD"startTime="1769721840995"iterationCount="1"activityStatus="DEBUG"activityType="EMPTY"messageID="0"correlationId="0"insertedInPIM="true"> <monitoringmonitor="true"monitorLevel="11"synchronizeLevel="0"/> <preassignment> <assignid="assign_before_o_2_1"name="assign_before_o_2_1"operation="replaceAllChildren"property="bpm:data/bpm:hello"description="noop"status="3"> <value>world</value> </assign> <assignid="assign_before_o_2_2"name="assign_before_o_2_2"operation="replaceChildrenWithData"property="bpm:data"description="noop"select="instance:instanceProperties/instance:activityInfo"selectOperation="selectAllChildren"useTargetNS="true"/> </preassignment> <activityStatus>DEBUG</activityStatus> </activity> </data>
Section “DELETE”
Note upfront: This will “delete/remove” the target node!
If you’re consistent, you would expect some XML here…however, my assigned bpm: data is remove/deleted/shredded…dûh 🤣
Condensed ChatGPT analyses
After this complete exercise ChatGPT generated a great usable cheat sheet (to put on top of your bed):
Add → target element stays; text concatenates, nodes are appended
Replace With → target element is replaced entirely
Replace Content With → target element stays; all content replaced
XML as String → always escaped text and treated as data (no node logic)
Select ≠ Children → Select copies the node; Children copies its children
First/Last Child → positional pick, not a node-set
Multi-select text ≠ multi-select nodes → text collapses, nodes repeat
Target NS → cleaner output for Add, noisier output for Replace
Including some notes:
Text vs node behavior is the hidden rule; Across Add / Replace / Replace Content:
text() → concatenation
node() → repetition
mixed selections behave asymmetrically
This explains 90% of BPM mapping #WTF-moments!
Target NS behaves differently for Add vs Replace:
Add + Target NS → cleaner XML
Replace + Target NS → namespace explosion
That’s not a bug; it’s consistent with how OPA rebuilds roots vs appends children.
…
This also helps; I want to…
…append XML nodes → Add + Select
…append text → Add + Expression
…replace everything → Replace With
…keep container, swap content → Replace Content With
…avoid namespaces → avoid Target NS on Replace
…inject raw XML safely → XML Structure, not XML as String
Nicely “DONE” 😅; It gives us all a great searchable reference card with examples to support your choice of usage mapping between source and target of the message mapping between data in a BPM. You probably want to save if in your favorites to get it close with you when you dive into your BPM implementations. Have a great BPM journey; till next week; in another fancy topic about “OpenText Process Automation Tips”….Cheers!
Don’t forget to subscribe to get updates on the activities happening on this site. Have you noticed the quiz where you find out if you are also “The Process Automation guy”?