Question

1
Replies
1214
Views
Manash_LSA Member since 2008 48 posts
Phalanx Consultancy Limited
Posted: 2 years ago
Last activity: 2 years 6 months ago
Closed

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
Data Integration Java and Activities
Moderation Team has archived post
Share this page LinkedIn