Thursday, August 15, 2013

setCompositeInstanceTitle Mediator

Setting the title for instances would be handy at runtime to identify them in the Enterprise manager. This can be achieved by using a assign activity and setting the property med:setCompositeInstanceTitle. But the property is not available in using the designer.This can be set in the .mplan file and below is a sample snippet.



 <operation name="executeAuthenticateUser" deliveryPolicy="AllOrNothing"  
        priority="4" validateSchema="false">  
    <switch>  
      <case executionType="direct"  
         name="CallSpAuthenticateUser.CallSpAuthenticateUser">  
       <action>  
         <transform>  
          <part name="$out.InputParameters"  
             function="xslt(xsl/InputParameters_To_InputParameters_2.xsl, $in.request)"/>  
         </transform>  
       <assign>  
       <copy target="$out.property.tracking.compositeInstanceTitle"  
          expression="med:setCompositeInstanceTitle('executeAuthenticateUser')"  
          xmlns:med="http://schemas.oracle.com/mediator/xpath"/>  
       </assign>  
         <invoke reference="CallSpAuthenticateUser"  
             operation="CallSpAuthenticateUser">  
          <onReply>  
            <transform>  
             <part name="$out.reply"  
                function="xslt(xsl/OutputParameters_To_OutputParameters_2.xsl, $in.OutputParameters)"/>  
            </transform>  
            <reply/>  
          </onReply>  
         </invoke>  
       </action>  
      </case>  
    </switch>  
   </operation>  



Below is the screenshot showing same.