Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-2190

Can't use immediateRole (maybe other assignment special variables) in conditions

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1 (Sinan)
    • Fix Version/s: 3.1.1
    • Component/s: None

      Description

      I have a metarole with the following logic:

      <role oid="00000000-0001-0000-0002-000000000010"
              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:q="http://prism.evolveum.com/xml/ns/public/query-3"
              xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">
          <name>JobTitle metarole</name>
          <description>System role for jobTitle provisioning to eDirectory</description>
          <inducement>
          	<construction>
          		<!-- The c: prefix in type must be there due to a JAXB bug -->
          		<resourceRef oid="9dbdde52-ec88-11e3-b755-001e8c717e5b" type="c:ResourceType"/>
              <kind>account</kind>
      	<intent>default</intent>
      	<attribute>
      		<ref>ri:jobTitle</ref>
      		<outbound>
      			<strength>strong</strength>
      			<source>
      				<path>$immediateRole/name</path>
      			</source>
      			<source>
      				<path>$immediateRole/roleType</path>
      			</source>
      			<expression>
      				<script>
      					<code>return name</code>
      				</script>
      			</expression>
      		</outbound>
      	</attribute>
          	</construction>
      	<condition>
      		<source>
      			<path>$immediateRole/roleType</path>
      		</source>
      		<expression>
      			<script>
      				<code>roleType == 'jobTitle'</code>
      			</script>
      		</expression>
      	</condition>
              <order>2</order>
      <!-- The user object will be used (order=1 would be the role which has this meta-role assigned) -->
          </inducement>  
      . . .
      

      The "<path>$immediateRole/roleType</path>" does not work in condition. I have this working in another metarole in outbound mapping.

        Attachments

          Activity

            People

            Assignee:
            vix Ivan Noris
            Reporter:
            vix Ivan Noris
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: