Example XML Request
In the following example, MPF calls the Write Request procedure
for each organization and user in the data node. The
ifNull="skip" attribute in the forEach node for
name="user" instructs MPF to skip execution for the current
iteration rather than fail the entire request whenever an
organization does not have a user.
<request>
<data>
<organizations>
<organization name="tailspintoys.com" type="primary" >
<user name="joe"/>
<user name="nancy"/>
</organization>
<organization name="wideworldimporters.com" type="primary">
<user name="fred"/>
</organization>
<organization name="fourthcoffee.com" type="secondary">
</organization>
<organization name="adventure-works.com" type="secondary">
</organization>
</organizations>
</data>
<procedure>
<execute namespace="Test Namespace" procedure="Write Request">
<forEach name="organization" root="data" path="organizations/organization"/>
<forEach name="user" root="organization" path="user" ifNull="skip"/>
<before source="organization" destination="executeData">
<xsl:template match="organization[@type='primary']">
<primaryOrg>
<xsl:value-of select="@name"/>
</primaryOrg>
</xsl:template>
<xsl:template match="organization[@type='secondary']">
<secondaryOrg>
<xsl:value-of select="@name"/>
</secondaryOrg>
</xsl:template>
</before>
<after source="executeData" destination="data" destinationPath="orgSignup" mode="merge"/>
</execute>
</procedure>
</request>