Question
Phalanx Consultancy Limited
GB
Last activity: 18 Apr 2018 13:00 EDT
Calling a decision table from a custom function
Hi,
I am facing while creating a custom function and calling a decision table from it. It is getting a compilation error which doesnt tell much. I need your input on resolving the issue. I have added the function below
if (theValue == null || theValue.trim().equals(""))
{
return true;
}
try
{
javax.mail.internet.InternetAddress emailAddr = new javax.mail.internet.InternetAddress(theValue);
emailAddr.validate();
return false;
}
catch (javax.mail.internet.AddressException ex)
{
return true;
}
try
{
int left_position = theValue.indexOf('@');
String Domain = theValue.substring(left_position + 1);
ClipboardPage StepPage = tools.getStepPage();
StepPage.putString("pyLabel",Domain);
return ObtainValue(tools, StepPage, "ValidateEmailDomains");
}
catch (Exception ex)
{
return true;
}
==========================================
Error:
Error(s) detected while generating java. Compiler reported: ---------- 1. ERROR in com/pegarules/generated/test_ValidateEmail_010101_0ITqZKjThaRoMqKV8Gx9$A.java (at line 127) return ObtainValue(tools, StepPage, "ValidateEmailDomains"); ^^^^^^^^^^^ The method ObtainValue(PublicAPI, ClipboardPage, String) is undefined for the type test_ValidateEmail_010101_0ITqZKjThaRoMqKV8Gx9$A