ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google

Mail Archive Home | shark List | December 2004 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [shark] output from JavaClassToolAgent to a workflow variable


it is quite interesting usage of JavaClass tool agent, but I'm not sure if 
you are using it correctly in overall system.
Did you modified original JavaClass tool agent that calls your class?
If you didn't, than you are actually starting a Swing application and DB 
transaction last until you press some button, which is not good, and can't be 
used that way for any real purpose. Anyway, you should check if the variables 
for which you are doing xxx.the_value=new Long(0) are in XPDL declared as OUT 
or INOUT formal parameters of Application definition (If they are IN 
parameters, it doesn't matter what you do to them - it won't be reflected in 

If you've modified JavaClass tool agent to open new thread for executing your 
CelsiusConverter class, than you also should provide that it waits for the 
swing application to finish, and after finishing to call set_result() and 
complete() method of the tool activity that started it (of course activity 
than should have MANUAL end, so that it does not finish after starting tool 
agent). Also, be aware that in that case if VM goes down, this tool activity 
will be in running state, and there will be nobody to finish it (because it 
is automatic activity). 

The main method of your class should be fine.

I can't discuss if your approach is good, because I don't know your system, 
but maybe you should look at the problem from the other side: maybe you need 
a swing client application (like our admin) instead of making tool agents 
that start Swing application?

Sorry that we can't manage to help more, and thanks for your useful 
suggestions. There are several topics you pointed out, but never had time to 
discuss (Petri-Nets : we haven't been leaded by this theory, BPEL agains 
XPDL, ...)


----- Original Message ----- 
From: Vojtech Huser 
To: Shark 
Sent: Tuesday, December 21, 2004 7:48 PM
Subject: [shark] output from JavaClassToolAgent to a workflow variable

I have a question about output from JavaClassToolAgent to a workflow variable.

The only example java code witch does some outputing is
and multiplication and substraction.

Those are very simple procedures. And there is little debuggin involved.

Are there any better examples ??
Please have mercy....
I am spending days and weeks on my trial and error strategy....

I am attaching my own JavaClass Agent which works (but not always and I don't 
know why)  (no reply to my previous post)
I mainly need lines with code like

result.the_value = .....

and coresponding xpdl.

Although the AppParameter.java is commented, it is so hard to figure out the 
authors's design from just the code....

Also is there any tips and tricks on how to debug your own Java tool.
Like can my class still have a main method when I compile it, put it to a 
jar, load it to shark, etc......Will it bother Shark?. 

There is so many try-and-error questions which is much easier answered by 
some little documentation rather then hours of my own try-and-error. And 
finding where the error was is SO HARD and so tedious. Restartign Shark and 
loading different versions. 

I do a pseudomain (vojtamain) method which is then called in the execute 
And when debugging, I use simple main calling this pseudomain method.

Can anyone post their examples when a java code needs to output something to 
Are other people also using just Swing or is there a better User interface to 
There must be people writing their own tools which are called by Shark with 
input and output parameters. 
I searched for the new ASAP code in the CVS

I would be EXTREMELY gratefull.

Vojtech Huser

P.S. can you please create a folder examples in the CVS and keep them 
separate from the shark code. Location of the MailProc.java in the CVS is 
really strange. Under modules.


You receive this message as a subscriber of the shark@xxxxxxxxxxxxx mailing 
To unsubscribe: mailto:shark-unsubscribe@xxxxxxxxxxxxx
For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.