Re: java object as pertinent data.

[email protected] Tue, 30 Aug 2005 14:20:26 -0400
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <OFC0030778.6941F62A-ON8525706D.0063B6BA-8525706D.0064BEFC@intellicare.com>
"Planterose Elsa" <[email protected]> wrote on 08/30/2005 11:16:29 
AM:

> Hello,
> I am testing Shark an I try to use a java object as pertinent data.
> My problem, is that I didn't find how to do in Shak documentation.

Hi Elsa, here's a link which explains how to define the data in the xpdl:
http://shark.objectweb.org/doc/1.1/HowTo/how_to.html#d0e360

Also, I am assuming you use JaWE to define your xpdl, correct? Then you 
can look at the tutorial/Manual on Jawe - I am pretty sure I have seen a 
section on this.

> How must I define this data in my process xpdl?
> If my java class's name is "metier.class", where must I do put it 

Bascially you must have your class in Shark's classpath.

> and how can I call it?

You can do something like this in your code to access it:

//first get the process context map:
Map processContextMap = currentActivity.process_context(); 
(currentActivity is WfActivity object)
MyClass myClassObject = (MyClass) 
processContextMap.get("processVariableName");

//do something with myClassObject here..Then:

//update:
processContextMap.put("processVariableName", myClassObject);
currentActivity.set_result(processContextMap); 

> Thank you for your help
> Elsa
> 

Regards,
Geeta
message-footer.txt (text/plain, 271 B)
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws