Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
5 subscribers
Views
3315 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Hi I need to evaluate an expression rule from my smart service. I cou
sivananthag
over 10 years ago
Hi
I need to evaluate an expression rule from my smart service. I could able to get the expression rule id through ContentService.searchByRoot(rulesRootId, ruleName, filter)
and I got an object of type FreeformRule and i can get the expression rule id from that object.
I need to evaluate this rule and get the results which return a custom data type.
I tried to use ExpressionService.evaluateExpression, but it is deprecated method. In processDesignService.evaluateExpression takes java.lang.String Expression as parameter, not expression rule id.
Please suggest me with suitable api that takes expression rule id as parameter and return results
Thanks
Jhothi
OriginalPostID-141185
OriginalPostID-141185
Discussion posts and replies are publicly visible
Parents
0
sivananthag
over 10 years ago
Hi
Thanks for all suggestions.
Will it not be possible to evaluate expression rule that returns custom data type from Smart service / Filter code?
I need to evaluate an expression rule inside Filter class, so i can not pass it as process parameter. So I created the below expression rule named EI_TESTRULE with rule definition:
='type!{bac.com/entitlement/AppianGroup}AppianGroupConfig'(
appianApplicationName: "Test",
appianGroupName: "Test",
appianParentGroupName: "Test",
appianCustomGroupType: "Test",
appianGroupSecurityType: "Test",
appianGroupMemberPolicyType: "Test",
appianGroupPrivacyPolicyType: "Test"
)
and it worked when i tested it from Appian designer portal.
I have imported this package to my filter (it got imported as com.bac.entitlement.AppianGroup.AppianGroupConfig.java class).
and I tried to get this expression rule evaluated in my filter class using the below code:
ProcessDesignService pds = getProcessDesignService();
TypedValue tv1 = pds.evaluateExpression("=EI_TESTRULE()");
When i execute the filter code, i got the below error:
com.appiancorp.process.expression.ExpressionRuntimeException$AppianExceptionProvider: Expression evaluation error : Rule ei_appiangroupconfig_constant has invalid form, so cannot be evaluated (APNX-1-4198-000)
Please help
Thanks
Jhothi
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
sivananthag
over 10 years ago
Hi
Thanks for all suggestions.
Will it not be possible to evaluate expression rule that returns custom data type from Smart service / Filter code?
I need to evaluate an expression rule inside Filter class, so i can not pass it as process parameter. So I created the below expression rule named EI_TESTRULE with rule definition:
='type!{bac.com/entitlement/AppianGroup}AppianGroupConfig'(
appianApplicationName: "Test",
appianGroupName: "Test",
appianParentGroupName: "Test",
appianCustomGroupType: "Test",
appianGroupSecurityType: "Test",
appianGroupMemberPolicyType: "Test",
appianGroupPrivacyPolicyType: "Test"
)
and it worked when i tested it from Appian designer portal.
I have imported this package to my filter (it got imported as com.bac.entitlement.AppianGroup.AppianGroupConfig.java class).
and I tried to get this expression rule evaluated in my filter class using the below code:
ProcessDesignService pds = getProcessDesignService();
TypedValue tv1 = pds.evaluateExpression("=EI_TESTRULE()");
When i execute the filter code, i got the below error:
com.appiancorp.process.expression.ExpressionRuntimeException$AppianExceptionProvider: Expression evaluation error : Rule ei_appiangroupconfig_constant has invalid form, so cannot be evaluated (APNX-1-4198-000)
Please help
Thanks
Jhothi
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data