Passing Arguments in a Metaphor Template

Document created by Candida Rodriguez-Lee on Oct 10, 2014Last modified by Candida Rodriguez-Lee on Oct 10, 2014
Version 2Show Document
  • View in full screen mode

Q. How  do I allow the passing of arguments in a metaphor template?

 

A. This applies to all metaphor templates (Decision Table, Decision Tree, and Score Model Templates).

 

If you want to statically or dynamically pass in a value to a Value Holder in a metaphor Code Template, you can't because you cannot create Value Holders in the metaphor templates.

 

Workaround:

  1. Create the metaphor inside of a Group Template. When you generate, use the default behavior for the Code Templates (which is to have them generated locally.)
  2. Add the Value Holders that you need in the Group Template.
  3. Use the Value Holders in the Group Template to pass arguments to the appropriate Value Holders in the metaphor Code Templates.

This is how you pass an argument from a Value Holder in the Group Template to a Value Holder in a metaphor Code Template:

 

  1. Open the metaphor Code Template.
  2. Open the Value Holder Editor in the Code Template.
  3. Click the Set Arguments icon to open the Set Arguments windows.
  4. Select Dynamic Override from the drop-down menu in the SRL Type field.
  5. Click the ... icon next to the field, and select an appropriate Value Holder from the "Global Template".
  6. Click OK and save your changes.

Attachments

    Outcomes