SubCondition - sorengranfeldt/mre GitHub Wiki

Condition xsi:type=SubCondition

This allow you to create a sub-condition group that contains other conditions. It can be used to group conditions with a logical Or (one or more conditions in the group must be met) or an And (all conditions in the group must be met).

Sub-condition groups can not only contain conditions, but can contain other sub-condition groups, to create nested conditions.

This example below shows a parent sub-condition of type Or that has two child sub-conditions of type And. This condition will evaluate true if either of the child sub-conditions evaluate true. And for one of the child groups to evaluate true, all their included conditions must evaluate true, since they have the operator value of And.

<ConditionBase xsi:type="SubCondition" Operator="Or">

	<ConditionBase xsi:type="SubCondition" Operator="And">
		<ConditionBase xsi:type="ConditionConnectedTo">
			<ManagementAgentName>contractors</ManagementAgentName>
		</ConditionBase>
		<ConditionBase xsi:type="ConditionMatch">
			<Description>is approved by workflow</Description>
			<MVAttribute>isApproved</MVAttribute>
			<Pattern>^true$</Pattern>
		</ConditionBase>
		<ConditionBase xsi:type="ConditionMatch">
			<Description>is active</Description>
			<MVAttribute>isActive</MVAttribute>
			<Pattern>^true$</Pattern>
		</ConditionBase>
	</ConditionBase>

	<ConditionBase xsi:type="SubCondition" Operator="And">
		<ConditionBase xsi:type="ConditionConnectedTo">
			<ManagementAgentName>hr</ManagementAgentName>
		</ConditionBase>
		<ConditionBase xsi:type="ConditionMatch">
			<Description>is active</Description>
			<MVAttribute>isActive</MVAttribute>
			<Pattern>^true$</Pattern>
		</ConditionBase>
	</ConditionBase>

</ConditionBase>
⚠️ **GitHub.com Fallback** ⚠️