Skip to content

Commit

Permalink
assignment SAP example
Browse files Browse the repository at this point in the history
  • Loading branch information
gpalos committed Apr 25, 2016
1 parent f967a3b commit da868f2
Show file tree
Hide file tree
Showing 11 changed files with 1,313 additions and 0 deletions.
74 changes: 74 additions & 0 deletions samples/resources/sap/assignment/extension-sap.xsd
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<!-- This is a runtime schema that defines data types used in the
<extension> part of the objects. It should be loaded during
test initialization (creation of prism context). -->

<xsd:schema elementFormDefault="qualified"
targetNamespace="http://example.com/mycustomer"
xmlns:tns="http://example.com/mycustomer"
xmlns:a="http://prism.evolveum.com/xml/ns/public/annotation-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:complexType name="UserExtensionType">
<xsd:annotation>
<xsd:appinfo>
<a:extension ref="c:UserType"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>

<xsd:element name="sapRoles" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo>
<a:indexed>true</a:indexed>
<a:displayName>SAP Roles</a:displayName>
<a:displayOrder>100</a:displayOrder>
</xsd:appinfo>
<xsd:documentation>
SAP Roles (activity groups)
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="sapProfiles" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo>
<a:indexed>true</a:indexed>
<a:displayName>SAP Profiles</a:displayName>
<a:displayOrder>110</a:displayOrder>
</xsd:appinfo>
<xsd:documentation>
SAP Profiles
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="sapGroups" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo>
<a:indexed>false</a:indexed>
<a:displayName>SAP Groups</a:displayName>
<a:displayOrder>120</a:displayOrder>
</xsd:appinfo>
<xsd:documentation>
SAP Groups
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="sapLastLogonDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:appinfo>
<a:indexed>false</a:indexed>
<a:displayName>Last logon date</a:displayName>
<a:displayOrder>120</a:displayOrder>
</xsd:appinfo>
<xsd:documentation>
SAP Groups
</xsd:documentation>
</xsd:annotation>
</xsd:element>

</xsd:sequence>
</xsd:complexType>

</xsd:schema>
150 changes: 150 additions & 0 deletions samples/resources/sap/assignment/object-template-org.xml
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<objectTemplate oid="10000000-0000-0000-0000-000000000241"
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
xmlns:c='http://midpoint.evolveum.com/xml/ns/public/common/common-3'
xmlns:t='http://prism.evolveum.com/xml/ns/public/types-3'
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ext="http://midpoint.evolveum.com/xml/ns/story/orgsync/ext">

<name>Org Template</name>

<!-- SAP Roles -->

<mapping>
<name>SAP Role (ActivityGroup) metarole assignment</name>
<authoritative>true</authoritative>
<source>
<path>orgType</path>
</source>
<expression>
<assignmentTargetSearch>
<targetType>c:RoleType</targetType>
<oid>056f714a-efac-476f-b38e-9588b4907e5b</oid>
</assignmentTargetSearch>
</expression>
<target>
<path>assignment</path>
</target>
<condition>
<script>
<code>orgType == 'sap-role'</code>
</script>
</condition>
</mapping>

<mapping>
<name>Parent for SAP Roles</name>
<authoritative>true</authoritative>
<source>
<path>orgType</path>
</source>
<expression>
<assignmentTargetSearch>
<targetType>c:OrgType</targetType>
<oid>d13f5205-3348-4742-aedb-874d272806eb</oid>
</assignmentTargetSearch>
</expression>
<target>
<path>assignment</path>
</target>
<condition>
<script>
<code>orgType == 'sap-role'</code>
</script>
</condition>
</mapping>

<!-- SAP Groups -->

<mapping>
<name>SAP Group metarole assignment</name>
<authoritative>true</authoritative>
<source>
<path>orgType</path>
</source>
<expression>
<assignmentTargetSearch>
<targetType>c:RoleType</targetType>
<oid>239990f4-ffb9-417e-8784-7dc72e645db5</oid>
</assignmentTargetSearch>
</expression>
<target>
<path>assignment</path>
</target>
<condition>
<script>
<code>orgType == 'sap-group'</code>
</script>
</condition>
</mapping>

<mapping>
<name>Parent for SAP Groups</name>
<authoritative>true</authoritative>
<source>
<path>orgType</path>
</source>
<expression>
<assignmentTargetSearch>
<targetType>c:OrgType</targetType>
<oid>293e12ed-553a-468a-a7d1-99460b264fa1</oid>
</assignmentTargetSearch>
</expression>
<target>
<path>assignment</path>
</target>
<condition>
<script>
<code>orgType == 'sap-group'</code>
</script>
</condition>
</mapping>

<!-- SAP Profiles -->

<mapping>
<name>SAP Profile metarole assignment</name>
<authoritative>true</authoritative>
<source>
<path>orgType</path>
</source>
<expression>
<assignmentTargetSearch>
<targetType>c:RoleType</targetType>
<oid>1fc57929-9f8c-4cc2-9bec-0873812704cd</oid>
</assignmentTargetSearch>
</expression>
<target>
<path>assignment</path>
</target>
<condition>
<script>
<code>orgType == 'sap-profile'</code>
</script>
</condition>
</mapping>

<mapping>
<name>Parent for SAP Profiles</name>
<authoritative>true</authoritative>
<source>
<path>orgType</path>
</source>
<expression>
<assignmentTargetSearch>
<targetType>c:OrgType</targetType>
<oid>b579d7b9-26f9-4cbd-87c7-74f549ce97e0</oid>
</assignmentTargetSearch>
</expression>
<target>
<path>assignment</path>
</target>
<condition>
<script>
<code>orgType == 'sap-profile'</code>
</script>
</condition>
</mapping>

</objectTemplate>

0 comments on commit da868f2

Please sign in to comment.