<role xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3" xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3" xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3" xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3" oid="00000000-dc00-dc00-0004-000000000072" version="11">
    <name>Role for projectId and roleId </name>
    <description>projectId:roleId</description>
    <metadata>
        <createTimestamp>2019-01-10T13:06:51.888+01:00</createTimestamp>
        <creatorRef oid="00000000-0000-0000-0000-000000000002" relation="org:default" type="c:UserType">
            <!-- administrator -->
        </creatorRef>
        <createChannel>http://midpoint.evolveum.com/xml/ns/public/model/channels-3#objectImport</createChannel>
    </metadata>
    <inducement id="1">
        <construction>
            <resourceRef oid="b55125ff-8744-47bb-a171-1128a78ab144" relation="org:default" type="c:ResourceType">
                <!-- openstackv30 -->
            </resourceRef>
            <kind>account</kind>
            <intent>default</intent>
            <attribute id="2">
                <c:ref>ri:userroles</c:ref>
                <outbound>
                    <strength>strong</strength>
                    <source>
                        <name>tenantRef</name>
                        <c:path>$focusAssignment/orgRef</c:path>
                    </source>
                    <source>
                        <c:path>$immediateRole/identifier</c:path>
                    </source>
                    <expression>
                        <script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="c:ScriptExpressionEvaluatorType">
                            <code>
// Added another column with "roleType"
if (!basic.isEmpty(tenantRef)) {
  org = midpoint.getOrgByOid(tenantRef?.getOid())
log.info("########################3role")
return org.getIdentifier() +  ":" + identifier;
}
                    </code>
                        </script>
                    </expression>
                </outbound>
            </attribute>
        </construction>
        <order>2</order>
    </inducement>
    <requestable>false</requestable>
    <condition>
        <source>
            <c:path>$focusAssignment/orgRef</c:path>
        </source>
        <expression>
            <script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="c:ScriptExpressionEvaluatorType">
                <code>!basic.isEmpty(orgRef)</code>
            </script>
        </expression>
    </condition>
</role>
