<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi,<br>
      <br>
      The answer is "no". It is not possible now. At least not simply.
      Maybe using some scripting hooks to manipulate the model context
      and replace active object template could be used. But that would
      require quite a deep understanding of midPoint internals and would
      not be very clean and maintainable code anyway.<br>
      <br>
      However, I see a value your proposal and it could be a nice little
      feature. Not sure about the implementation effort right now ...
      the createOnDemand is in fact executing a new operation (on demand
      create) within another operation. Therefore it is not entirely
      trivial. But it should not be that difficult either.<br>
      <br>
      Anyway, currently the team is quite busy. Therefore we cannot make
      it "for free". But if you would consider sponsoring this feature
      then we still can shuffle the priorities a bit and it can fit into
      3.4 development plan. Thinking about that it should not be that
      difficult to backport to 3.3 (3.3.1) if needed. The 3.4-SNAPSHOT
      and 3.3 code bases in the model component (where this needs to be
      implemented) are still almost the same. Let me know if you are
      considering sponsorship. In that case I can invest some time to
      investigate it further and provide a better estimate.<br>
      <br>
      <pre class="moz-signature" cols="72">-- 
Radovan Semancik
Software Architect
evolveum.com
</pre>
      <br>
      <br>
      On 12/09/2015 10:47 PM, Devin Rosenbauer wrote:<br>
    </div>
    <blockquote
cite="mid:CABiXpeTaXU1H-J-Xb5ySPniHLe+F+gLzeo5iJFP00qu_HfbiiA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Is it possible to set the object template on a
              particular type of createOnDemand role? I'd rather not use
              the global role template if possible. (Alternatively, it
              would be nice if you could do a conditional include.)<br>
              <br>
            </div>
            I tried the following:<br>
            <br>
                           <populateItem><br>
                              <expression><br>
                                
            <value>10000000-0000-0000-0000-000000000241</value><br>
                              </expression><br>
                              <target><br>
                                
            <c:path>objectTemplateRef</c:path><br>
                              </target><br>
                           </populateItem><br>
            <br>
          </div>
          I also tried using an <assignmentTargetSearch> tag to
          look up the object template object. I also tried specifying
          the target as c:objectTemplateRef, c:objectTemplate, and
          objectTemplate.<br>
          <br>
        </div>
        <div>For example:<br>
          <br>
                         <populateItem><br>
                            <expression><br>
                               <assignmentTargetSearch><br>
                                 
          <targetType>c:ObjectTemplateType</targetType><br>
                                  <filter><br>
                                     <q:equal><br>
                                       
          <q:path>c:oid</q:path><br>
                                        <expression><br>
                                          
          <value>10000000-0000-0000-0000-000000000241</value><br>
                                        </expression><br>
                                     </q:equal><br>
                                  </filter><br>
                               </assignmentTargetSearch><br>
                            </expression><br>
                            <target><br>
                              
          <c:path>c:objectTemplate</c:path><br>
                            </target><br>
                         </populateItem><br>
        </div>
        <div><br>
        </div>
        <div>The error messages indicate that the target is the problem.
          "No target item that would conform to the path objectTemplate
          in expression in mapping in objectTemplate"</div>
        <div><br>
        </div>
        <div>There doesn't seem to be a sample for doing this, and the
          documentation only shows how to set it globally for users and
          roles.<br>
        </div>
        <div><br>
        </div>
        How would one go about doing this? Is there a better way to do
        this sort of thing in Midpoint?<br clear="all">
        <div>
          <div>
            <div>
              <div><br>
                -- <br>
                <div>
                  <div dir="ltr">Devin Rosenbauer<br>
                    Principal Consultant<br>
                    Identity Works LLC<br>
                    <a moz-do-not-send="true"
                      href="tel:%2B1%20585%20210%203201"
                      value="+15852103201" target="_blank">+1 585 210
                      3201</a><br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
    <br>
  </body>
</html>