[kepler-users] accsessing the current workflow

Tristan King tristan.king at jcu.edu.au
Fri Mar 10 15:13:31 PST 2006


When you extend one of the base actor classes your class will have a function called workspace(). this returns an instance of the class Workspace, which is basically the workflow.

i've done similar thing with some SRB actors i've created. I have a static class that stores information about different SRB servers, and each actor that wants to access that information, passes the workspace() to a get() function differentiate between different workflows (i also pass in an id value to differentiate between different servers on the same workflow, but that bit's probably not important to you :)).

to be a bit more specific, i use the workspace().hashcode() function. but i'm not yet 100% sure if the hashcode of the workspace can change or whether it is definatly always different between workflows, so i've still got a bit of testing to do there.

anyways, hope this helps.
you can also have a look at my blog, which has an entry with a bit more detail here: http://plone.jcu.edu.au/dart/Members/TristanKing/tristan-king/archive/2006/03/09/revised-srb-actors
and if you want to have a poke around at my code, fell free. you can access it from here. https://svn.hpc.jcu.edu.au/svn/dart/kepler/trunk/src/org/dart/srb/

thoughts, comments and critisisms are very welcome :)

Good luck,
--Tristan

---- Original message ----
>Date: Fri, 10 Mar 2006 16:13:02 -0500
>From: Srinath Perera <hperera at cs.indiana.edu>  
>Subject: [kepler-users] accsessing the current workflow  
>To: kepler-users at ecoinformatics.org
>
>Hi All;
>
>1) Does Kepler has a ID and a scope for the current workflow? For an 
>example can I have all my actors in a one workflow share same 
>information and have a one scope (like a session)
>
>2) When I am writing a Actor how can I accsess the current workflow ID? 
>(if there is something like that)
>
>Thanks
>Srinath
>_______________________________________________
>Kepler-users mailing list
>Kepler-users at ecoinformatics.org
>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-users



More information about the Kepler-users mailing list