Question

1
Replies
1290
Views
Manash Pratim Chaliha (Manash_LSA)
Phalanx Consultancy Limited
Pega Lead System Architect
Phalanx Consultancy Limited
GB
Manash_LSA Member since 2008 49 posts
Phalanx Consultancy Limited
Posted: April 16, 2018
Last activity: April 18, 2018
Posted: 16 Apr 2018 9:12 EDT
Last activity: 18 Apr 2018 13:00 EDT
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, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.