Re: java object as pertinent data.

[email protected] Thu, 8 Sep 2005 17:00:30 -0400
Newsgroups gmane.comp.java.enhydra.shark
Message-ID <OFCB05B2E3.A8A8540F-ON85257076.007325F6-85257076.0073681D@intellicare.com>
Hello Vojtech,

I will try and come up with an example to see if I can do this. (So far 
simple Strings etc. have been enough for me so what i wrote below was what 
I knew I *had* to do, so it wasn't really tested!). But before I do that, 
can you tell me what is the kind of errors you are getting? Do you have 
any trace you can send?

Geeta

Vojtech Huser <[email protected]> wrote on 09/08/2005 04:51:50 PM:

> Geeta,
> 
> I have the same problem as Elsa.
> I have read you reply and tried to use it but I get a lot of errors 
> when I try to finish the code. (which you sugested)
> 
> e.g.
> creating correctly the currentActivity object (as WfActivity  object) in 
my 
> TestUsingJavaClassAsParam01.java.
> 
> 
> Is there any complete examle where such  UsingJavaClassAsParam.java 
> would be in full.
> 
> also the code for "metier.class" and the corresponding .xpdl file...
> where it is defined as a type....
> 
> ...rewriting all my objects into string variables and passing those 
> is very tedious. (which is what I have to use since there are some 
> examples for using those...)
> 
> Vojtech
> 
> 
> 

> On 8/30/05, [email protected] <[email protected] > wrote:
> 
> "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 
> 
> 
> --
> 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
> 

> 
> 
> -- 
> This message has been scanned for viruses and 
> dangerous content by MailScanner, and is 
> believed to be clean. 
> --
> 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

> 
> CONFIDENTIALITY NOTICE:This email is intended solely for the person 
> or entity to which it is addressed and may contain confidential 
> and/or protected health information.  Any duplication, 
> dissemination, action taken in reliance upon, or other use of this 
> information by persons or entities other than the intended recipient
> is prohibited and may violate applicable laws.  If this email has 
> been received in error, please notify the sender and delete the 
> information from your system.  The views expressed in this email are
> those of the sender and may not necessarily represent the views of 
> IntelliCare.
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