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


Am Di 21.12.2004 19:48, Vojtech Huser <huser56@xxxxxxxxxx> schrieb:

> I have a question about output from JavaClassToolAgent to a workflow 
> variable.
> 
> The only example java code witch does some outputing is
> additionproc.java
> 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 
> method.
> 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 Shark.
> Are other people also using just Swing or is there a better User interface 
> to use.
> 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.


Hi'

in addition to the answer from Sasa some remarks from me.

In Xpdl you had to declare a Variable with OUT or INOUT, as Sasa has written, 
in your case it must be of type INT, and 
don't forget to add this Variable not only in the Formal Parameters for that 
application, but also in your Java Code (execute Method).

When you follow this roules it should work, like in our case. We haven't 
modified the JavaClassAgent, the standard is used.

And for the User Interaction (Swing, HTML, .. ) we put some Code between, 
because otherwise you risk to block the
Engine, which is in any case not very useful. 

On debugging Level we added some Code based on Log4j/Commonslogging to filter 
out only the Debug-Infos from our  Classes to a specific File for better 
reading.

But using also a main-Method could be very useful, if it works.

Regards M@nfred






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

Reply via email to:

Powered by MHonArc.

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