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.
- 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.)
- Add the Value Holders that you need in the Group Template.
- 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:
- Open the metaphor Code Template.
- Open the Value Holder Editor in the Code Template.
- Click the Set Arguments icon to open the Set Arguments windows.
- Select Dynamic Override from the drop-down menu in the SRL Type field.
- Click the ... icon next to the field, and select an appropriate Value Holder from the "Global Template".
- Click OK and save your changes.