How a request works

Requests are submitted to Microsoft Provisioning Framework (MPF) by a client. Each request contains one XML procedure that invokes the functionality of an underlying provider or another procedure. Each procedure must conform to the XML schema registered in MPF.

There are two ways to submit requests:

When MPF executes a request, it generates an executeXml node internally to pass the request data as XML to the called procedure in the respective provider. When a provider finishes processing a request, it returns an XML response node (containing either a successful result or an error) to the calling user.

Example of a request

The following example shows a request, including the procedure that is called by the request.

<request xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <data>
	<organizations>
	<organization name="OrgA" type="primary"/>
	<organization name="OrgB" type="secondary"/>
	<organization name="OrgC" type="secondary"/>
	</organizations>
  </data>
  <procedure>
	<!-- Procedure call to SignupOrg-->
	<execute namespace="New Namespace" procedure="New Request">
	<before source="data" destination="executeData" mode="merge"/>
	<after source="executeData" destination="data" mode="merge"/>
	</execute>
  </procedure>
</request>

In the previous request, the data node supplies the source data. The procedure starts with a call (not shown) to SignupOrg. SignupOrg is the down-stream procedure that receives the selected names in the response returned by the execution step, the call to New Request (execute) The before node merges the data from the data node into the executeData node for SignupOrg. The after node merges information from New Request's executeData node into the response data. (In this simple example, the returned data is the same as that which was originally passed by the before node.)

Example of processed data sent to the provider

The following example shows the content of the executeXML document that MPF passes to the provider.

<executeXml>
  <context>
	<transactionContext 
	transactionId="{CE8E0B55-B582-4D95-A796-92FDDD8228B7}" />
	<executeContext procedure="Write Request" procedureExecId="2" 
	providerSource="Provisioning.SimpleProvider.1" namespace="Test Namespace" 
	type="write" />
  </context>
  <executeData>
	<primaryOrg>OrgA</primaryOrg>
	<secondaryOrg>OrgB</secondaryOrg>
	<secondaryOrg>OrgC</secondaryOrg>
  </executeData>
</executeXml>

After the provider receives this data, it passes the data into the executeDatanode of the Write Request.

Example of a response

The following example shows the response to the processed request.

<response>
  <data>
	<organizations>
	<organization name="OrgA" type="primary"/>
	<organization name="OrgB" type="secondary"/>
	<organization name="OrgC" type="secondary"/>
	</organizations>
	<orgSignup>
	<primaryOrg>OrgA</primaryOrg>
	<secondaryOrg>OrgB</secondaryOrg>
	<secondaryOrg>OrgC</secondaryOrg>
	</orgSignup>
  </data>
</response>

The response shows the merged organization data in <data> and the selected names in <orgSignup>.

For information on what a request is and how it is implemented in Microsoft Provisioning System, see What a request is and Request implementation in Microsoft Provisioning System. For information on procedures, see Procedure architecture. For information on namespaces, see Namespace architecture. The Microsoft Provisioning Framework Software Development Kit (SDK) contains additional resources to help you implement procedures, requests, and namespaces. This includes the complete XML schema for all elements and information on how to implement providers. For more information on the SDK and how to use it, see Microsoft Provisioning Framework SDK.