Creating Plugins
Calculation of an assessed characteristic value can be by means of a macro.

For more details on the use of
HOPEX macros, see technical article
All about starting with APIs.
Creating a macro
To create a macro:
1. Open the Quotation Rules window that interests you.
2. Click the arrow at the right of the Macro box and select Create.
The macro creation wizard opens.
3. Enter the Name of the macro.
4. Select the check box corresponding to the type of macro you want to use:
• "macro (VB) Script": to create a macro implemented by VB Script code
• "macro based on component"
• "macro Java": to create a macro implemented by Java code
• "existing macro": to use an existing macro, of which field Reusable is selected.
5. Click Next.
6. If the macro you have created can be reused for another quotation rule, select the Reusable box.
7. Click Finish.
Implementing the macro
The macro should have a method called 'compute' with this signature:
Sub compute(mgobjScoringRule As MegaObject, mgobjValueContext As MegaObject, mgcolAnswers As MegaCollection , mgobjAssessedValue As MegaObject)
End Sub
List of arguments:
• mgobjScoringRule: current quotation rule.
• mgobjAssessedValue: assessed characteristic value to be computed.
• mgobjValueContext: assessment node of current assessed characteristic value.
• mgcolAnswers: list of answers figuring in computing the assessed characteristic value.
Macros example
The HOPEX Enterprise Risk Management proposes a default macro: "ERM - Answer quotation rule". This macro can be reused.
The assessed characteristic value corresponds to the average of answers collected.