FFFF XmlIfPipe · frankframework/frankframework Wiki · GitHub
[go: up one dir, main page]

Skip to content
BonnoSmeele edited this page Oct 10, 2024 · 1 revision

a simple example

			
<XmlIfPipe name="XmlIfPipe" xpathExpression="/*/Result/Status='OK'">
	<Forward name="then" path="NextPipe1"/>
	<Forward name="else" path="NextPipe2"/>
</XmlIfPipe>

The input for the xmlifpipe usually needs to be an xml statement. You can however also test against a string value by using a parameter.

	
<XmlIfPipe 
	getInputFromSessionKey="<dummyXML/>"
	name="CheckParamValue"
	xpathExpression="$EnvironmentVariable='Single'"
	thenForwardName="NextPipe1"
	elseForwardName="NextPipe2">
	<Param name="EnvironmentVariable" value="${Resource/Environment}" />
</XmlIfPipe>

Example using regex:

	
<XmlIfPipe name="CheckHTTPStatusCode" getInputFromSessionKey="ResultCode" preserveInput="true" regex="[2,3]\d{2}">
	<forward name="then" path="NextPipe1"/>
	<forward name="else" path="NextPipe1"/>
</XmlIfPipe>

Complicated Example:

	
<XmlIfPipe 
	name="XmlIfPipe"
	getInputFromSessionKey="&lt;dummyXML/&gt;"
	xpathExpression="$ResultParam='true'"
	thenForwardName="NextPipe1"
	elseForwardName="NextPipe2">
	<Param name="ResultParam" xpathExpression="if(concat($Param1,$Param2) = $Param3) then 'true' else 'false'">
		<Param name="Param1" sessionKey="orgId"/>
		<Param name="Param2" sessionKey="beans" xpathExpression="/beans"  type="DOMDOC"/>
		<Param name="Param3" value="${fixedvalue}"/>
	</Param>
</XmlIfPipe>

Clone this wiki locally

0