Sarasvati with DB2 and Server Restart Issue questions

21 views
Skip to first unread message

kreecha puphaiboon

unread,
Sep 9, 2011, 12:42:33 AM9/9/11
to sarasvati-wf-users, borirak...@scb.co.th, kreecha.p...@scb.co.th
Hi there,

I work in a bank and i have to do POC to get Sarasvati working as a
workflow engine. I know that Sarasvati works with MySQL.

As my bank use DB2, may i ask whether there is an issue when working
with DB2 that anyone know of and if so what would be a solution?

Another question is that if i restart the server (change flow process
or any unexpected event), what status and any lost on document in the
node will be lost or not? Should there be any concern i should be
aware, please?

Thank you in advance,
Kreecha

Paul Lorenz

unread,
Sep 9, 2011, 9:07:55 AM9/9/11
to sarasvati...@googlegroups.com, borirak...@scb.co.th, kreecha.p...@scb.co.th
Hi Kreecha,
  DB2 has not been tested. You'd need to port the DDL (tables creation and initialization script) over, but there's a good chance it would work. As far as server restarts are concerned, as long as you are using the hibernate backend, you should not lose any data. Server restarts are not required to update process definitions.

Cheers,
Paul


--
You received this message because you are subscribed to the Google Groups "sarasvati-wf-users" group.
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.


kreecha puphaiboon

unread,
Sep 12, 2011, 5:18:19 AM9/12/11
to sarasvati-wf-users
Hi Paul,

Thank you for your respond, my team is testing Sarasvati with DB2 V8
now, will let you know the result.

Two more questions:

1) about Guard, do you have any code example using guard please, my
team does not understand it clearly and we would like to see the code?
2) Wait status, does it use when there are two approvals entering the
wait node?

Kind regards,

Kreecha

Paul Lorenz

unread,
Sep 12, 2011, 12:05:24 PM9/12/11
to sarasvati...@googlegroups.com
The process defined in random-guard.wf.xml uses guards, showing how you can use discard or skip for making decisions. This wiki page also describes the domain specific language (Rubric) that is used by guards: http://code.google.com/p/sarasvati/wiki/Rubric

If you have more questions about guards, please ask with specifics. The areas of confusion I could see would be
  1) What can a guard do?
  2) How are guards specified?
  3) How do the predicates in Rubric get implemented?

The first question should be answered here: http://sarasvati.googlecode.com/svn/java/tags/v1.0.4/doc/reference/html/ch03s03.html
The second and third questions are anwered on the Rubric wiki page noted above.

These might not answer your questions completely, so feel free to ask more specific questions.

The behavior of a node will vary based on what kind of join type is specified. If it has a join type of AND, the it will only execute when all incoming arcs have tokens. If it has a join type of OR, it will execute for every token that arrives. Does that answer your second question?

Cheers,
Paul

kreecha puphaiboon

unread,
Sep 13, 2011, 3:13:39 AM9/13/11
to sarasvati-wf-users
Dear Paul,

Thank you very much for bearing with me. I have limitation with
English and the time pressure from my company, therefore questions
have not been constructed well. I am sorry about that. After reading
the wiki you passed me, I have another question

"If the approvals are granted by people, the nodes will almost
certainly be executed asynchronously. This means that when a token
arrives at Approval 1, the node will generate a notification to the
user who is to do the approval. The token will then enter a wait
state. Execution may continue elsewhere in the process, but this token
will wait until the user enters the system and grants approval.
If approvals are done by software which does a check and then
returns immediately the tokens will not have enter a wait state, but
may continue immediately. "

From the above sentences, granted by people or software. What do you
mean and how do you do it?. You mean 'granted by software' is the
skip?

We do now start to experiment with your project daily and will ask
more if we have problem or question somewhere.

Thank you for answering and bear with me.

Cheers,
Kai

On Sep 12, 11:05 pm, Paul Lorenz <plor...@gmail.com> wrote:
> The process defined in random-guard.wf.xml uses guards, showing how you can
> use discard or skip for making decisions. This wiki page also describes the
> domain specific language (Rubric) that is used by guards:http://code.google.com/p/sarasvati/wiki/Rubric
>
> If you have more questions about guards, please ask with specifics. The
> areas of confusion I could see would be
>   1) What can a guard do?
>   2) How are guards specified?
>   3) How do the predicates in Rubric get implemented?
>
> The first question should be answered here:http://sarasvati.googlecode.com/svn/java/tags/v1.0.4/doc/reference/ht...

Paul Lorenz

unread,
Sep 13, 2011, 8:35:31 AM9/13/11
to sarasvati...@googlegroups.com
Hi Kreecha,
  The examples demonstrate some of the use cases.

http://code.google.com/p/sarasvati/source/browse/java/trunk/examples/com/googlecode/sarasvati/example/MessageNode.java

The message node is an example of a node which performs some functionality then completes immediately. In this case, it's the simplest possible thing, it just prints out a message then completes the token. So in the case of an approval, if the node were to approve or reject based on some computable attribute, this is one way in which it could be implemented. So let's say we want to be sure that every sentence in an associated document starts with an uppercase letter. The node could calculate that right in the execute method, then complete the token, moving either forward or back.

Here is an example of node which delegates to a user:
http://code.google.com/p/sarasvati/source/browse/java/trunk/examples/com/googlecode/sarasvati/example/hib/HibExampleTaskNode.java

The execute method generates a Task instance (which tracks the associated token). The node then goes into a wait state (which isn't a special status, it just means the node has an incomplete token sitting on it).

The user then sees the task waiting for them and completes it. In the hibernate example, see the processTask method:

http://code.google.com/p/sarasvati/source/browse/java/trunk/examples/com/googlecode/sarasvati/example/hib/HibExampleConsole.java#232

Hope this helps,
Cheers,
Paul
Reply all
Reply to author
Forward
0 new messages