Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
samplexml-mt-wf-set-mpr-creation.xml
<?xml version="1.0" encoding="utf-8" ?>
<Lithnet.ResourceManagement.ConfigSync>
<Variables>
<Variable name="#domain#" value="%userdomain%"/>
<Variable name="#PATH#" value =".\" />
</Variables>
<Operations>
<!-- Create Reference to Recipient -->
<ResourceOperation operation="None" resourceType="Person" id="myRecipient1">
<AnchorAttributes>
<AnchorAttribute>AccountName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="none" name="AccountName">blah</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Create Obu Create Email Template -->
<ResourceOperation operation="Add Update" resourceType="EmailTemplate" id="ObuCreate">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__MT:ObuCreate</AttributeOperation>
<AttributeOperation operation="replace" name="Description">Obu User Creation Notification</AttributeOperation>
<AttributeOperation operation="replace" name="EmailTemplateType">Notification</AttributeOperation>
<AttributeOperation operation="replace" name="EmailBody" type="file">#PATH#Templates\ObuUserCreated.html</AttributeOperation>
<AttributeOperation operation="replace" name="EmailSubject">Obu User Creation Notification</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Create Obu Move Email Template -->
<ResourceOperation operation="Add Update" resourceType="EmailTemplate" id="ObuMove">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__MT:ObuMove</AttributeOperation>
<AttributeOperation operation="replace" name="Description">Obu User Mover Notification</AttributeOperation>
<AttributeOperation operation="replace" name="EmailTemplateType">Notification</AttributeOperation>
<AttributeOperation operation="replace" name="EmailBody" type="file">#PATH#Templates\ObuUserMoved.html</AttributeOperation>
<AttributeOperation operation="replace" name="EmailSubject">Obu User Move Notification</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Create Obu Disable Email Template -->
<ResourceOperation operation="Add Update" resourceType="EmailTemplate" id="ObuDisabled">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__MT:ObuDisabled</AttributeOperation>
<AttributeOperation operation="replace" name="Description">Obu User Disabled Notification</AttributeOperation>
<AttributeOperation operation="replace" name="EmailTemplateType">Notification</AttributeOperation>
<AttributeOperation operation="replace" name="EmailBody" type="file">#PATH#Templates\ObuUserDisabled.html</AttributeOperation>
<AttributeOperation operation="replace" name="EmailSubject">Obu User Disabled Notification</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Create Obu Deletion Email Template -->
<ResourceOperation operation="Add Update" resourceType="EmailTemplate" id="ObuDeletion">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__MT:ObuDeletion</AttributeOperation>
<AttributeOperation operation="replace" name="Description">Obu User Deletion Notification</AttributeOperation>
<AttributeOperation operation="replace" name="EmailTemplateType">Notification</AttributeOperation>
<AttributeOperation operation="replace" name="EmailBody" type="file">#PATH#Templates\ObuUserDeletion.html</AttributeOperation>
<AttributeOperation operation="replace" name="EmailSubject">Obu User Deletion Notification</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Create Obu Create Workflow Definition -->
<ResourceOperation operation="Add Update" resourceType="WorkflowDefinition" id="ObuCreateWF">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__WF:ObuUserCreationNotification</AttributeOperation>
<AttributeOperation operation="replace" name="Description">User creation notification for Obu</AttributeOperation>
<AttributeOperation operation="replace" name="XOML" type="file">#PATH#Templates\ObuCreate.xml</AttributeOperation>
<AttributeOperation operation="replace" name="RequestPhase">Action</AttributeOperation>
<AttributeOperation operation="replace" name="RunOnPolicyUpdate">false</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Create Obu Deletion Workflow Definition -->
<ResourceOperation operation="Add Update" resourceType="WorkflowDefinition" id="ObuDeletionWF">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__WF:ObuUserDeletionNotification</AttributeOperation>
<AttributeOperation operation="replace" name="Description">User Deletion notification for Obu</AttributeOperation>
<AttributeOperation operation="replace" name="XOML" type="file">#PATH#Templates\ObuDeletion.xml</AttributeOperation>
<AttributeOperation operation="replace" name="RequestPhase">Action</AttributeOperation>
<AttributeOperation operation="replace" name="RunOnPolicyUpdate">false</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Create Obu Disabled Workflow Definition -->
<ResourceOperation operation="Add Update" resourceType="WorkflowDefinition" id="ObuDisabledWF">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__WF:ObuUserDisablementNotification</AttributeOperation>
<AttributeOperation operation="replace" name="Description">User Disabled notification for Obu</AttributeOperation>
<AttributeOperation operation="replace" name="XOML" type="file">#PATH#Templates\ObuDisabled.xml</AttributeOperation>
<AttributeOperation operation="replace" name="RequestPhase">Action</AttributeOperation>
<AttributeOperation operation="replace" name="RunOnPolicyUpdate">false</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Create Obu Moved Workflow Definition -->
<ResourceOperation operation="Add Update" resourceType="WorkflowDefinition" id="ObuMoveWF">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__WF:ObuUserMoveNotification</AttributeOperation>
<AttributeOperation operation="replace" name="Description">User Moved notification for Obu</AttributeOperation>
<AttributeOperation operation="replace" name="XOML" type="file">#PATH#Templates\ObuMove.xml</AttributeOperation>
<AttributeOperation operation="replace" name="RequestPhase">Action</AttributeOperation>
<AttributeOperation operation="replace" name="RunOnPolicyUpdate">false</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Create OBU Set -->
<ResourceOperation operation="Add Update" resourceType="Set" id="ObuActiveSet">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__Set:OBU Users</AttributeOperation>
<AttributeOperation operation="replace" name="Description">Contains all Active Users in the OBU OU</AttributeOperation>
<AttributeOperation operation="replace" name="Filter" type="filter">/Person[(adOU = 'OU=OBU,DC=blah,DC=blah,DC=ac,DC=uk')]</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Create OBU Deleted Set -->
<ResourceOperation operation="Add Update" resourceType="Set" id="ObuDeletedSet">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__Set:OBU Deleted Users</AttributeOperation>
<AttributeOperation operation="replace" name="Description">Contains all Users in the OBU OU, whose end date has passed plus 180 days</AttributeOperation>
<AttributeOperation operation="replace" name="Filter" type="filter">/Person[(EmployeeEndDate < op:subtract-dayTimeDuration-from-dateTime(fn:current-dateTime(), xs:dayTimeDuration('P180D'))) and (InScopeForDeletion = True) and (adOU = 'OU=OBU,DC=blah,DC=blah,DC=ac,DC=uk')]</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Create OBU Disabled Set -->
<ResourceOperation operation="Add Update" resourceType="Set" id="ObuDisabledSet">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__Set:OBU Disabled Users</AttributeOperation>
<AttributeOperation operation="replace" name="Description">Contains all Disabled Users in the OBU OU</AttributeOperation>
<AttributeOperation operation="replace" name="Filter" type="filter">/Person[(adOU = 'OU=OBU,DC=blah,DC=blah,DC=ac,DC=uk') and (EmployeeStatus = 'DISABLED')]</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Obu User Creation MPR -->
<ResourceOperation operation="Add Update" resourceType="ManagementPolicyRule" id="ObuUserCreationMPR">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__MPR:ObuUserCreation</AttributeOperation>
<AttributeOperation operation="replace" name="Description">Triggers the "##xmlref:ObuCreateWF:DisplayName##" workflow when a user account transitions into the "##xmlref:ObuActiveSet:DisplayName##" set</AttributeOperation>
<AttributeOperation operation="replace" name="ActionParameter">*</AttributeOperation>
<AttributeOperation operation="replace" name="ActionType">TransitionIn</AttributeOperation>
<AttributeOperation operation="replace" name="ActionWorkflowDefinition" type="xmlref">ObuCreateWF</AttributeOperation>
<AttributeOperation operation="replace" name="Disabled">false</AttributeOperation>
<AttributeOperation operation="replace" name="GrantRight">false</AttributeOperation>
<AttributeOperation operation="replace" name="ManagementPolicyRuleType">SetTransition</AttributeOperation>
<AttributeOperation operation="replace" name="ResourceFinalSet" type="xmlref">ObuActiveSet</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Obu User Deletion MPR -->
<ResourceOperation operation="Add Update" resourceType="ManagementPolicyRule" id="ObuUserDeletionMPR">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__MPR:ObuUserDeletion</AttributeOperation>
<AttributeOperation operation="replace" name="Description">Triggers the "##xmlref:ObuDeletionWF:DisplayName##" workflow when a user account transitions into the "##xmlref:ObuDeletedSet:DisplayName##" set</AttributeOperation>
<AttributeOperation operation="replace" name="ActionParameter">*</AttributeOperation>
<AttributeOperation operation="replace" name="ActionType">TransitionIn</AttributeOperation>
<AttributeOperation operation="replace" name="ActionWorkflowDefinition" type="xmlref">ObuDeletionWF</AttributeOperation>
<AttributeOperation operation="replace" name="Disabled">false</AttributeOperation>
<AttributeOperation operation="replace" name="GrantRight">false</AttributeOperation>
<AttributeOperation operation="replace" name="ManagementPolicyRuleType">SetTransition</AttributeOperation>
<AttributeOperation operation="replace" name="ResourceFinalSet" type="xmlref">ObuDeletedSet</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Obu User Disable MPR -->
<ResourceOperation operation="Add Update" resourceType="ManagementPolicyRule" id="ObuUserDisableMPR">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__MPR:ObuUserDisablement</AttributeOperation>
<AttributeOperation operation="replace" name="Description">Triggers the "##xmlref:ObuDisabledWF:DisplayName##" workflow when a user account transitions into the "##xmlref:ObuDisabledSet:DisplayName##" set</AttributeOperation>
<AttributeOperation operation="replace" name="ActionParameter">*</AttributeOperation>
<AttributeOperation operation="replace" name="ActionType">TransitionIn</AttributeOperation>
<AttributeOperation operation="replace" name="ActionWorkflowDefinition" type="xmlref">ObuDisabledWF</AttributeOperation>
<AttributeOperation operation="replace" name="Disabled">false</AttributeOperation>
<AttributeOperation operation="replace" name="GrantRight">false</AttributeOperation>
<AttributeOperation operation="replace" name="ManagementPolicyRuleType">SetTransition</AttributeOperation>
<AttributeOperation operation="replace" name="ResourceFinalSet" type="xmlref">ObuDisabledSet</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
<!-- Obu User Move MPR -->
<ResourceOperation operation="Add Update" resourceType="ManagementPolicyRule" id="ObuUserMoveMPR">
<AnchorAttributes>
<AnchorAttribute>DisplayName</AnchorAttribute>
</AnchorAttributes>
<AttributeOperations>
<AttributeOperation operation="replace" name="DisplayName">__MPR:ObuUserMove</AttributeOperation>
<AttributeOperation operation="replace" name="Description">Triggers the "##xmlref:ObuMoveWF:DisplayName##" workflow when a user account transitions out of the "##xmlref:ObuActiveSet:DisplayName##" set</AttributeOperation>
<AttributeOperation operation="replace" name="ActionParameter">*</AttributeOperation>
<AttributeOperation operation="replace" name="ActionType">TransitionOut</AttributeOperation>
<AttributeOperation operation="replace" name="ActionWorkflowDefinition" type="xmlref">ObuMoveWF</AttributeOperation>
<AttributeOperation operation="replace" name="Disabled">false</AttributeOperation>
<AttributeOperation operation="replace" name="GrantRight">false</AttributeOperation>
<AttributeOperation operation="replace" name="ManagementPolicyRuleType">SetTransition</AttributeOperation>
<AttributeOperation operation="replace" name="ResourceCurrentSet" type="xmlref">ObuActiveSet</AttributeOperation>
</AttributeOperations>
</ResourceOperation>
</Operations>
</Lithnet.ResourceManagement.ConfigSync>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment