Question
COX
US
Last activity: 24 Feb 2017 8:21 EST
Declare Expression is receiving an Exception
Need an assistance. We are using 7.1.8 and I'm receiving an exception whenever I tried to Checkin the Declare Expression. Plus sometimes the Declare Expression is not being triggered.
Need an assistance. We are using 7.1.8 and I'm receiving an exception whenever I tried to Checkin the Declare Expression. Plus sometimes the Declare Expression is not being triggered.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Areteans Technologies
AU
Can you share the screenshot of Declare expression rule, it seems you're trying to perform some function which is not relevant
Pegasystems Inc.
IT
Soory, i got the same problem. I cannot understand if i have to look at somewhere else or nobody answered to this topic.
thanks in advance.
a
Pegasystems Inc.
IN
Hello
What function you are trying to use ? Is it coming for all the declare expression or only particular expression having this function ?
Also have you checked your tracer ?
Pegasystems Inc.
IT
Hello.
i just try to use and expression return true from expression builder. Inside i put something like:
if
@equalsIgnoreCase(.RiskProfile.countryCode ,"ch") || @equalsIgnoreCase(.RiskProfile.countryCode ,"it")
AND
if @equalsIgnoreCase(.RiskProfile.acceptanceResult,"accepted") || @equalsIgnoreCase(.RiskProfile.acceptanceResult,"accepted")
And so on. Every declare expression where i put more than one expression got this error.
thanks,
a
PEG
US
Can you please show the complete stack trace of the exception?
PEG
US
It seems that this error always appears when a concern exists about the top level page. Here is one such occurrence:
protected boolean isCompatibleWithTopLevelPageClass(IPRThread aThread, String aTopLevelPageClass) {
String sBehavior = getContextBehavior();
if (sBehavior.equals(DeclarativeCommon.DeclareExpressions.EXPRESSIONS_CONTEXT_BEHAVIOR_BOUND)) {
throw new IllegalStateException("Implementation error: This function not for use with context-bound configurations.");
It seems that this error always appears when a concern exists about the top level page. Here is one such occurrence:
protected boolean isCompatibleWithTopLevelPageClass(IPRThread aThread, String aTopLevelPageClass) {
String sBehavior = getContextBehavior();
if (sBehavior.equals(DeclarativeCommon.DeclareExpressions.EXPRESSIONS_CONTEXT_BEHAVIOR_BOUND)) {
throw new IllegalStateException("Implementation error: This function not for use with context-bound configurations.");
} else if (sBehavior.equals(DeclarativeCommon.DeclareExpressions.EXPRESSIONS_CONTEXT_BEHAVIOR_FREE)) {
return true; // everything is okay here
}
Try making an explicit reference to the top-level page for each of the expressions. Perhaps we have an issue where by adding a second expression, you run the risk of requiring a switch to another top-level page; perhaps the "bound" error means once a page is selected, you must stick with that one? If directly referencing a top-level page (I understand that might not be feasible, but try it for confirmation) fixes the issue, you may know how to proceed.
PEG
US
I think this may clarify the issue. Could these properties not be in the Applies-To class?
// Also include "" here, since older rules (pre-5.3) lack the pyContextBehavior property
if ((DeclareExpressions.EXPRESSIONS_CONTEXT_BEHAVIOR_BOUND.equals(sBehaviorValue)) || (sBehaviorValue.equals(""))) {
return "only when the top-level page is of the Applies To class";
I think this may clarify the issue. Could these properties not be in the Applies-To class?
// Also include "" here, since older rules (pre-5.3) lack the pyContextBehavior property
if ((DeclareExpressions.EXPRESSIONS_CONTEXT_BEHAVIOR_BOUND.equals(sBehaviorValue)) || (sBehaviorValue.equals(""))) {
return "only when the top-level page is of the Applies To class";
} else if (DeclareExpressions.EXPRESSIONS_CONTEXT_BEHAVIOR_FLEXIBLE.equals(sBehaviorValue)) {
return "when the top-level page is of the Applies To class, or one of the following:";
} else if (DeclareExpressions.EXPRESSIONS_CONTEXT_BEHAVIOR_FREE.equals(sBehaviorValue)) {
return "regardless of any pages it is contained in";
} else {
throw new IllegalArgumentException("Invalid Context Behavior value \"" + sBehaviorValue + "\" for rule: " + aRulePage.getString(DictionaryName.PropertyName.sHandle));
}
}
Pegasystems Inc.
IT
Thanks a lot for your support, sorry for my absence but i am in vacation now. I will be back next monday and i will check it as soon as possible.
thanks,
andrea