2.5 getMIM

The getMIM function block is executed whenever it is called by any other agents in the workflow to retrieve user defined MIMs by the Java agent.

This should not be confused with the getMIM function used in the Java codes to retrieve MIMs from the workflow configuration itself. TheĀ getMIM function block is solely used to declare user defined MIMs for the Java agent and to be populated from within the Java code configuration itself.

For more on theĀ getMIM Java code function, please refer to 3.3 MIM Related Functions

Example MIM

Example - MIM

public void configure(ConfigDefinition cfg) {
        cfg.defineOutputMim("prodName", MIMValueType.STRING);
        cfg.defineOutputMim("idNum", MIMValueType.INT);
        cfg.defineOutputMim("prodPrice", MIMValueType.DOUBLE);
}

public Object getMIM(String mimName) {
        if (mimName == "prodName") {
            return "this is a prod name."; 
        }
        else if (mimName == "idNum") {
            return 123456789; 
        }
        else if (mimName == "prodPrice") {
            double me = 1.7976931348623157E308;
            return me;
        }else{
            return null;
        }
}