Node execution or rejection after delay

46 views
Skip to first unread message

EricS

unread,
Nov 10, 2012, 3:43:33 PM11/10/12
to sarasvati...@googlegroups.com
We want to use a workflow engine in Java for one of our projects. As was already noted in the forum, it has been quiet lately for Sarasvati development, but also for a lot of other workflow projects.
After some research, we think Sarasvati it still the better option, but it would need some basic functionilty such as execution or rejection of a node after a certain delay.
I did not find this option, but maybe there is some clever setting I missed? Can anybody help me?

Thanx, Eric


Paul Lorenz

unread,
Nov 12, 2012, 8:01:01 PM11/12/12
to sarasvati...@googlegroups.com
Hmm, I have a couple of thoughts on how this could be supported. 

My current thinking is do the following.

1. Add a Retry GuardResult which will include the time to retry
2. Add support for Retry in Rubric (which already has some date support)
3. Add a built in predicate for isFirstGuardEval. Other predicates could use guardEvalCount.
4. Add an interface for a timer service, so users can plug in their timer service of choice
5. Provide a simple thread based timer service as a default

This would require adding some fields in wf_node_token: 
  guard_eval_count int not null, 
  next_guard_eval   timestamp

Timer service would look something like:

public interface TimerService
{
  void scheduleNodeTokenRetry(final NodeToken token)
}

BaseEngine would have a new method that could be overridden.

public TimerService getTimerService() { .. }

Usage:

<node type="node" name="delayedNode">
  <guard>IF isFirstGuardEval THEN retry at 1 hour after currentTime ELSE ACCEPT</guard>
</node>

<node type="node" name="delayedNode">
  <guard>IF shipmentReady 
             THEN Accept 
             ELSE IF tooManyEvals 
                      THEN Skip TimeOut 
                      ELSE retry at 1 day after currentTime 
  </guard>
</node>

Thoughts?

Cheers,
Paul




--
You received this message because you are subscribed to the Google Groups "sarasvati-wf-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sarasvati-wf-users/-/PyDVXO96v4MJ.
To post to this group, send email to sarasvati...@googlegroups.com.
To unsubscribe from this group, send email to sarasvati-wf-us...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sarasvati-wf-users?hl=en.

est...@ellipsis.nl

unread,
Dec 5, 2012, 8:24:41 AM12/5/12
to sarasvati...@googlegroups.com
Hi Paul,

Yesterday I downloadedthe latest version 2.0.1 and got it running with our code. Are your ideas already incorporated in this latest release, I seem to notice some changes in the datamodel which indicate this?

Eric

Op dinsdag 13 november 2012 02:01:22 UTC+1 schreef Paul Lorenz het volgende:
To unsubscribe from this group, send email to sarasvati-wf-users+unsub...@googlegroups.com.

Paul Lorenz

unread,
Dec 5, 2012, 8:59:46 AM12/5/12
to sarasvati...@googlegroups.com
Yes, you can now have a guard which does something like

if needToDelay then delay until 5 minutes after myCondition else Accept.

I have a very simple scheduler built, but if you need something with persistence support and/or multi-node support you'll want to write your own.

And

I need to write this up at some point, but I wanted to get the release out first, since doc updates can take me a while :)

Let me know if you have any questions.

Cheers,
Paul


To view this discussion on the web visit https://groups.google.com/d/msg/sarasvati-wf-users/-/ZMvVLRqydl0J.

To post to this group, send email to sarasvati...@googlegroups.com.
To unsubscribe from this group, send email to sarasvati-wf-us...@googlegroups.com.

est...@ellipsis.nl

unread,
Dec 5, 2012, 9:12:34 AM12/5/12
to sarasvati...@googlegroups.com
Thanx for your quick reply, I will try to make some tests. Eric

Op woensdag 5 december 2012 14:59:46 UTC+1 schreef Paul Lorenz het volgende:

To unsubscribe from this group, send email to sarasvati-wf-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/sarasvati-wf-users?hl=en.
Reply all
Reply to author
Forward
0 new messages