[kepler-users] Fwd: Re: using custom java classes in kepler system

Zhijie GUAN zhijieg at yahoo.com
Thu Mar 9 13:06:01 PST 2006


Hi, Siva,

What Chad described in his email is the generic way to
include an actor into the Kepler system. If you only
have your own class on hand, you still need to know
how to create an actor's java class. Kepler has a
tutorial on how to create an actor. Please see
http://kepler-project.org/Wiki.jsp?page=KeplerDevelopersTutorial.

The actor is actually a wrapper class which wraps the
user custom function and facilitates the communication
between the user's function and all the other
functional components in the workflow. If you want to
include your function component (like the java class
you have) into Kepler, you need to create an actor.
But just FYI, Kepler provides a lot of functions that
can be used by the user without even writing a single
line of code. Most of the functions are quite
convenient and useful to the end users. For example,
if you want to display a static greeting message to
the user, you can put your greeting text in a text
file, let a small workflow read that message and
display to the user. So the small workflow would be
like:

Constant (for file name) --> File Reader --> Text
Display

The constant, FileReader, and TextDisplay actors are
already included in Kepler. What the user need to do
is drag-and-drop those actors onto the canvas, connect
them, and do a little bit configuration (like set the
file path+name to the constant).

Personally I prefer not writting any code if I can. I
believe you will find more interesting functions of
Kepler when you dig into it, just like I did. The key
is to think your program/application as a workflow,
and design it based on the model of Actor-Oriented
computation.

Let me know if I can provide any more help! B->

Zhijie

--- Chad Berkley <berkley at nceas.ucsb.edu> wrote:

> Date: Thu, 09 Mar 2006 10:58:10 -0800
> From: Chad Berkley <berkley at nceas.ucsb.edu>
> To: Sivagowri Swaminathan <sivagowri at hotmail.com>
> CC: Kepler-users at ecoinformatics.org
> Subject: Re: [kepler-users] using custom java
> classes in kepler system
> 
> Hello Siva,
> 
> You can easily do this.  What you need to do is get
> your actor's java 
> class compiled and put in the kepler classpath. 
> then, to add it to the 
> actor library, create a directory under src/actors
> that is the name of 
> your actor.  add a MANIFEST and actor metadata file
> for your actor, then 
> run 'ant buildkarlib' from inside the kepler
> directory.  This will 
> create a KAR (kepler archive) file for your actor
> and put it in the 
> kepler/kar/actors directory where it should be read
> the next time kepler 
> starts.  You can look in any of the other src/actor
> directories to see 
> examples of how to build the directory for your
> actor.  Note that the 
> LSID of your actor and of the kar file (set in the
> MANIFEST file) must 
> be unique.  There is a readme file that should tell
> you what the last 
> lsid used is in the 'kar' and 'actor' namespaces.
> 
> Let us know if you need any other help. We're also
> available on IRC at 
> irc.ecoinformatics.org (#kepler) if you'd like
> real-time help.
> 
> thanks for your interest in kepler,
> chad
> 
> Sivagowri Swaminathan wrote:
> > Hi
> > 
> > I am quite new to the kepler system and I would
> like to use it for my 
> > project. I need some information about how to use
> custom java classes as 
> > 'actors' in a workflow ?
> > 
> > What I am trying to acheive is:
> > 
> > I have a java class that displays a greeting. I
> need to invoke the class as 
> > a textdisplay actor.
> > 
> > is it possible for me to incorporate the java
> class directly into the actors 
> > library? It is my understanding that only MOML/xml
> files can be incorporated 
> > as actors.
> > 
> > can somebody help me please?
> > 
> > Thanx
> > Siva
> > 
> > 
> > _______________________________________________
> > Kepler-users mailing list
> > Kepler-users at ecoinformatics.org
> >
>
http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-users
> > 
> _______________________________________________
> Kepler-users mailing list
> Kepler-users at ecoinformatics.org
>
http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-users
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Kepler-users mailing list