Hi Andrew,
these are good comments and Peter already answered quite some of them.
RIFE/Workflow is still work in progress and started as a technology
demo for RIFE/Continuations. I'm very happy that you're actually
looking at it in more depth since there hasn't even been a formal
announcement about it yet. Your input is very valuable and please
continue providing it.
As I see it, it shouldn't be difficult to add the possibility to
provide data to a task when it's executing. The main possible problem
is that if this data consists of your own classes, the classloader
that is used for running the continuations could get confused.
However, I don't expect this to be a real problem. The
BasicContinuableClassLoader first checks if the parent classloader has
loaded a class and uses those instead. So normally everything should
be alright.
I propose to simply create this method:
public void start(final String className, final Object data)
The Task class can then have a setData(Object data) method which is
called through an extension of BasicContinuableRunner that knows how
to do this.
How does this sound?
Geert
On 21 Nov 2007, at 18:36, [EMAIL PROTECTED] wrote:
>
> With RIFE/Workflow you request the TaskRunner to create a task in the
> following way.
>
> TaskRunner runner = new TaskRunner();
> runner.start("package.TaskClass");
>
> But the only way that I can see to communicate with that task is via
> Events. What if I want to create a given Task to handle a specific
> job? My thought process says that I need to pass the Task parameters
> when it starts up, or before I pass it to the TaskRunner. Given that
> the existing runner.start() method only takes a class name as a String
> i have no ability to do so. I investigatined extending TaskRunner
> myself but it appears as though BasicContinuableRunner has the same
> limitation of only starting a Task by a class name as a String.
>
> Question #1: What's the reason for only allowing the start of a task
> via a String name.
>
> Question #2: Is there a way to configure a single task before I pass
> it to a TaskRunner.
>
> Question #3: Overall....what I'm trying to accomplish here is to
> create a workflow engine that is efficent and can execute
> concurrently. My idea right now is to have a set of Tasks that will
> be created to handle a workflow, and that those Tasks will utilize
> continuations so that they do not utilize my resources when I am
> waiting on external systems to respond (thus avoiding some kind of
> sleep/wake/poll loop). But it seems to me that I will need to
> configure this set of tasks for the Task at hand.
>
> An example for the sake of argument would be something along the lines
> of:
> The system receives a file
> The system parses that file and creates an object that represents it's
> content
> The system then realizes it needs to perform several high latency
> tasks for that specific object.
> The system creates a Task(s) that will execute them and waitForEvent()
> such as to be efficent.
>
> Any advice on how to architect this type of solution utilizing the
> basic componets in RIFE/Workflow will be appreciated. Or perhaps a
> more specific example of how the writers of RIFE/Workflow intended it
> to be utilized would be valuable for us to see.
>
> Thank you,
> Andrew
> >
--
Geert Bevin
Terracotta - http://www.terracotta.org
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"rife-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rife-users?hl=en
-~----------~----~----~----~------~----~------~--~---