How to call our own java custom method in ITIM workflow:
There are different approaches for calling our own java
methods or classes in ITIM Workflows.
One of those examples is calling the custom java method in
ITIM script node of the ITIM workflow.
There are three main steps to be done for adding an custom
extension in ITIM workflows:
l
Creating the jar of the java code.
1.Now
make a jar file of the java program without including the supporting jars while
making the jar file.
2.Now
the supporting jars which are required for executing your code should be added
to the itim reference libraries
Step 2: Modifying the properties file in itim:
1.
Add the java package and class reference in the scriptframework.properties file
in the itim data folder in the below format.
ITIM.java.access.<extension name>=<Package name as
well as classname>
Eg:- ITIM.java.access.AppExt=com.company.AppExtExample
Step 3: Calling the method in Workflow:
1.Now
restart the Websphere including the ITIM application, appserver, nodes and dmgr.
2.In
the Script Node you can call the custom java method.
Eg:-obi = new com.company.ConnectDB2();
var b=obi.entlist("a","b");
Where com.company.ConnectDB2() is the package name
And entlist is the method and a,b are the parameters
References:-
No comments:
Post a Comment