Trying to invoke an expression rule with input parameter from my java plugin.

Trying to invoke an expression rule with input parameter from my java plugin.

Tried using evaluateExpression(java.lang.String expression, NamedTypedValue[] variableValues) method in ProcessDesignService Interface.But not able to construct variableValues of type NamedTypedValue[].

Do we have any sample code to pass a parameter to an expression rule from java ?

Thanks in Advance.

OriginalPostID-197077

OriginalPostID-197077

  Discussion posts and replies are publicly visible

Parents
  • I think evaluateExpression should work. How are you constructing the NamedTypedValue? You should use the below constructor. Be sure to pass the parameter name and type. To determine type for an associated parameter, use the constants from AppianTypeLong.* (e.g. AppianTypeLong.STRING).

    NamedTypedValue(java.lang.String name, java.lang.Long instanceType)
Reply
  • I think evaluateExpression should work. How are you constructing the NamedTypedValue? You should use the below constructor. Be sure to pass the parameter name and type. To determine type for an associated parameter, use the constants from AppianTypeLong.* (e.g. AppianTypeLong.STRING).

    NamedTypedValue(java.lang.String name, java.lang.Long instanceType)
Children
No Data