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

Can't use thisObject in role attribute mappings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.0 (Newton)
    • Fix Version/s: 3.1 (Sinan)
    • Component/s: None
    • Labels:
      None
    • Git Revision:
      git-v3.0.1devel-53-g43016b0

      Description

      Trying to set the resource icfs:name attribute in role, based on assignment attribute "tenant" and role name to make something like "icfs:name=rolename@tenant".

      This does not work:

          <inducement>
          	<construction>
          		<!-- The c: prefix in type must be there due to a JAXB bug -->
          		<resourceRef oid="00000000-1111-1111-0001-000000000010" type="c:ResourceType"/>
      
              <kind>generic</kind>
      	<intent>tenantService</intent>
              <attribute>
                  <ref>icfs:name</ref>
                  <outbound>
                      <source>
                          <name>tenant</name>
                          <path>$focusAssignment/c:extensio/customer:tenant</path>
                      </source>
                      <source>
                          <name>roleName</name>
                          <path>$thisObject/name</path>
                      </source>
                      <expression>
                          <script>
                              <code>tenant + '@' + roleName</code>
                          </script>
                      </expression>
                  </outbound>
              </attribute>
      

      The exception:

      2014-07-07 12:43:08,347 [] [http-bio-18080-exec-6] ERROR (com.evolveum.midpoint.web.page.admin.users.PageOrgUnit): Couldn't save org. unit, reason: Unexpected root role:000000
      00-dc00-dc00-0004-000000000046(XXXXX WS Tenant Service) (relative path:name) in source definition in mapping in for attribute {.../connector/icf-1/resource-schema-3}name in ro
      le:00000000-dc00-dc00-0004-000000000046(XXXXX WS Tenant Service)
      

      Stack trace:

      java.lang.IllegalArgumentException: Unexpected root role:00000000-dc00-dc00-0004-000000000046(XXXXX WS Tenant Service) (relative path:name) in source definition in mapping in 
      for attribute {.../connector/icf-1/resource-schema-3}name in role:00000000-dc00-dc00-0004-000000000046(XXXXX WS Tenant Service)
              at com.evolveum.midpoint.model.common.expression.ExpressionUtil.resolvePath(ExpressionUtil.java:227) ~[model-common-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.common.mapping.Mapping.parseSource(Mapping.java:820) ~[model-common-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.common.mapping.Mapping.parseSources(Mapping.java:788) ~[model-common-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.common.mapping.Mapping.evaluate(Mapping.java:480) ~[model-common-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.LensUtil.evaluateMapping(LensUtil.java:560) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.Construction.evaluateMapping(Construction.java:464) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.Construction.evaluateAttribute(Construction.java:360) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.Construction.evaluateAttributes(Construction.java:332) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.Construction.evaluate(Construction.java:278) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.EvaluatedAssignment.evaluateConstructions(EvaluatedAssignment.java:143) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.projector.AssignmentProcessor.evaluateConstructions(AssignmentProcessor.java:676) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.projector.AssignmentProcessor.evaluateConstructions(AssignmentProcessor.java:658) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.projector.AssignmentProcessor.processAssignmentsProjectionsWithFocus(AssignmentProcessor.java:453) ~[model-impl-3.1-SNAPSHOT.j
      ar:na]
              at com.evolveum.midpoint.model.impl.lens.projector.AssignmentProcessor.processAssignmentsProjections(AssignmentProcessor.java:158) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.projector.FocusProcessor.processFocusFocus(FocusProcessor.java:259) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.projector.FocusProcessor.processFocus(FocusProcessor.java:176) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.projector.Projector.project(Projector.java:153) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.Clockwork.click(Clockwork.java:199) ~[model-impl-3.1-SNAPSHOT.jar:na]
              at com.evolveum.midpoint.model.impl.lens.Clockwork.run(Clockwork.java:156) ~[model-impl-3.1-SNAPSHOT.jar:na]
      

        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: