I want to call Java Class Method by using Workflow.
For this I create new JAR file with following code :
Code:
package com.testing.io;

public class Test {
	public String retString(String str) {
		String _str = "This is a test";
		System.out.println("Testing>>>>>>>>>>" + _str);
		System.out.println("Test str>>>>>>>>>>" + str);
		return _str;
	}
}
After that I create a simple Workflow with one Condition activity. In my condition I just added the following code to call above JAR method "retString"
function a()
{
var result = new Packages.com.testing.io.Test.retString('This is not a test');
if(result != '') {
return true;
} else {
return false;
}
}
a()
But when I run start this workflow by using uaadmin. It gives me the following error on User App log (/opt/netiq/idm/apps/tomcat/logs/catalina.out)
Caused by: com.novell.soa.script.mozilla.javascript.EcmaError : TypeError: [JavaPackage com.testing.io.Test.retString] is not a function.