Thanks for the response. Here is what i was trying and not succeeding.
I am trying to load the custom java class in to the script node.
Here is the process i have followed to load the custom jar.
1) Java class is as below and converted this class into a jar file ->
package com.ibm.isim.custom;
import java.util.ArrayList;
import java.util.List;
import com.ibm.itim.mail.MailManager;
import com.ibm.itim.mail.NotificationMessage;
import com.ibm.itim.workflow.model.ActivityResult;
public class SendMail {
public ActivityResult sendMailToPersonalID(String mailAddress, String mailSubject, String mailBody) {
try {
List<String> addresses = new ArrayList<String>();
addresses.add(mailAddress);
NotificationMessage nMessage = new NotificationMessage(addresses, mailSubject, mailBody, mailBody);
MailManager.notify(nMessage);
return new ActivityResult(ActivityResult.STATUS_COMPLETE, ActivityResult.SUCCESS, "eMail Sent",
null);
} catch (Exception e) {
return new ActivityResult(ActivityResult.STATUS_COMPLETE, ActivityResult.FAILED, "eMail Not Sent", null);
}
}
}
2) Imported into Configure -> Identity Manager -> External Library => SendMail.jar
3) Updated the scriptframework.properties with the below key, value.
ITIM.java.access.SendMail -> com.ibm.isim.custom.SendMail
4) Created a workflow -> script node and calling the class by passing the appropriate varibles (All varibles has values. Total script not pasted here) as below.
var sendMail = new com.ibm.isim.custom.SendMail();
var response = sendMail.sendMailToPersonalID(mailAddress, mailSubject, mailBody);
#########################
I am getting the follwing error from the ISIM trace log. I am unsure if i am missiing any configuration here in this process. Please advise. Thanks.
<LogText><![CDATA[CTGIMA428E The 884710766567845643 process has stopped.
Error: <Message Id = "Script interpreter error, line=4, col=40: [ReferenceError] 'com' not found"></Message> ]]></LogText>
<Source FileName="com.ibm.itim.workflow.engine.WorkflowEngine" Method="terminateProcess"/>
<TranslationInfo Type="JAVA" Catalog="tmsMessages" MsgKey="com.ibm.itim.workflow.PROCESS_TERMINATED"><Param><![CDATA[884710766567845643]]></Param><Param><![CDATA[<Message Id = "Script interpreter error, line=4, col=40: [ReferenceError] 'com' not found"></Message>]]></Param></TranslationInfo>
#Support#SupportMigration#Verify