Provisioning Schema::where
Element that encapsulates a possible condition for checking a selected value in a procedure. A parent select node can have multiple where nodes, but only the first where node evaluating to true is processed. This element is part of the provisioning schema of Microsoft Provisioning Framework (MPF).
Arguments
Input Argument | Description |
---|---|
case |
Required. If the value of the value node matches the value of the selection, the case value is assigned to the select node. |
value |
Required. This value is compared to the selection value to determine if this case should be assigned. |
Remarks
No remarks.
Sample Code
Example XML Request
<request>
<data>
<organizations>
<organization name="tailspintoys.com">
<count>1</count>
<users />
</organization>
<organization name="wideworldimporters.com">
<count>1</count>
</organization>
</organizations>
<service>myHosting</service>
</data>
<procedure>
<!-- Select type of service organization to provision. -->
<select name="service" source="data" sourcePath="service" defaultCase="4" ifNullCase="4">
<where value="myHosting" case="1" />
<where value="myInbox" case="2" />
<where value="myCalendar" case="3" />
<where value="myProfile" case="3" />
</select>
<!-- Execute procedure when service name is myHosting. Execute procedure multiple times based on count. -->
<execute namespace="Test Namespace" procedure="Read Request">
<forEach root="data" path="organizations/organization" name="org" />
<repeat source="org" sourcePath="count" />
<executeData service="myHosting" />
<when select="service" case="1" />
<after source="executeData" destination="data" />
</execute>
<!-- Execute procedure when service name is myInbox. -->
<execute namespace="Test Namespace" procedure="Read Request">
<executeData service="myInbox" />
<when select="service" case="2" />
<after source="executeData" destination="data" />
</execute>
<!-- Execute procedure only when users are present for the organization. -->
<execute namespace="Test Namespace" procedure="Read Request">
<forEach root="data" path="organizations/organization" name="org" />
<when source="org" sourcePath="users" />
<after source="executeData" destination="data" />
</execute>
</procedure>
</request>
Applies To
Provisioning Schema; Provisioning Schema::select