Paul Lorenz wrote:
>
> Response in-line.
>
>
> On Sat, Aug 1, 2009 at 12:25 AM, Cheong Chung Onn <
chun...@gmail.com
First I need to confess that I have not seen or used any BPM engine
other than JBPM 2.0 :). Whatever I suggest or comment may not be sound.
My need for future event facility stems from the fact that my user wants
to be able to schedule to start a workflow process some time in the
future. I already have a simple workaround to this by using a crontab
like service to check if the due-date has expired, if yes - then
Process#start.
A thought struck me after mulling over the your example -> Token ==
TimeEvent or perhaps we can have a Temporal Node
<time-node>
<arc waitFor="2 days" to="checkMyLetterbox"/>
<arc on="every tues" to="meeting"/>
<arc is="date predicate" to="sendEmail"/>
</time-node>
>
>
>
>
>
> Your example shows <time-event> is a child element of Node. I wonder
> should <time-event> element be a sub-type of <guard> element?
>
>
> Hmm, you can only have 1 guard. Maybe you could elaborate on this some
> more? Or did you want to be able to specify guards on time events?
Yes I understand there can only be 1 guard. I saw the Rubric API page,
it mentioned about creating a time predicate hence i thought that a
time-event can be a subclass of guard.
>
> <time-event ...>
> <if>Order.isExpedited or Customer.isGoldLevel</if>
> <time-out>(5 days after tokenCreated</time-out>
> </time-event>
>
>
>
>
> I have an immediate need for this feature, my approach is to
> implement a
> crontab service and periodically poll what are the outstanding tasks
> needs to be started.
>
> However after reading your approach, I am keen to work on it so
> that it
> would benefit others with similar needs as well. There is however one
> issue that is bothering me, how should the crontab service be
> implemented? Should it be a standalone process or should it be in
> a JEE
> container? What happens if this scheduling process is down? Should i
> have yet another process monitoring it and respawn the scheduler when
> needed. What's your thought on this?
>
>
>
> I don't think Sarasvati should concern itself with the reliablily of
> the scheduling service. Quartz or the EE container should be reliable
> and/or be able to monitor itself.
Agreed.
>
>
>
> Also I thought if sarasvati would to include a sort of IOC
> capability it
> would make it even more flexible.
>
>
> I'm not against this, I'm just not sure how it would work. The place I
> see injection being most useful would be on the node. However, nodes
> are shared resources (or should be), for performance reasons. Maybe we
> could hack it by creating a node copy/proxy when a node token is
> executed. However, I'm not clear on how this would work.
Initially I did think that having IOC for Node would give it another
degree of flexibility well I am still very happy using Sarasvati without
it :)
>
>
>
> One other note, I have looked into Quartz, it looks good however I
> thought we can push the envelope further by providing all these Time
> related event stuff to use the iCalendar specs RFC 2445. Perhaps this
> can be post 1.0 if we can get the basic Scheduling framework up first.
>
>
> Finally, I have a less than a week to get this up, how do you think we
> should approach this?
>
> Regards
> chung-onn
>
>
>
> I think it might be useful if you gave some example of how you see
> this being used. I tend to see event being generated based on business
> data associated with the workflow, or off times in the workflow (such
> as node create time), as opposed to static times.
I agree with your views about events. Btw, my colleague introduced
cron4j today, it seems simple, lightweight and comprehensive. I would be
exploring it, perhaps I would see how to use it for Sarasvati.
http://www.sauronsoftware.it/projects/cron4j/index.php
Regards
chiung-onn