Easier NodeType setup in hibernate

12 views
Skip to first unread message

chun...@gmail.com

unread,
May 24, 2009, 1:54:03 AM5/24/09
to sarasvati-wf-users
Hi Paul,

I find Sarasvati is simple yet powerful and so far i am impressed by
what it has. I only find setting up the NodeType in Hibernate model is
cumbersome and different from its Memory model cousin. In Hibernate
model one has to use an Insert sql statement to add new Node types
whereas on the Memory model one simply needs to Engine#addNodeType()

I have just managed to a tiny enhancement to allow the Hibernate model
to do the same like its Memory model cousin and there is no need to do
any Insert SQL statements. This is my approach

I created 2 new classes - HibNodeType class and @NodeType class.
HibNodeType class is the Java equivalent for WF_NODE_TYPE table.

Every Hib Node has to be annotated by a @NodeType annotation class
which has 2 attributes - id, description

To add new node type to the engine, just do - engine#addNodeType()
below is how my code now looks like

engine.addNodeType("custom", CustomNode.class);
engine.addNodeType("wait", CustomNode.class);
engine.addNodeType("usertask", UserTaskNode.class);

I would be happy to contribute my code to your project.

Finally thanks for creating such a cool workflow engine.

Cheers!
chung-onn

Paul Lorenz

unread,
May 24, 2009, 2:19:58 PM5/24/09
to sarasvati...@googlegroups.com

That sounds reasonable. How would you like to contribute, via patch
or commit (if you're interested in doing longer term development)?

> Finally thanks for creating such a cool workflow engine.
>

Thanks for helping take the rough edges off of it :)

Paul

chun...@gmail.com

unread,
May 26, 2009, 8:53:53 PM5/26/09
to sarasvati-wf-users
Hi Paul,

Not sure if you receive my email 2 days back. Anyway, I am keen to do
longer term development :) cheers!

On May 25, 2:19 am, Paul Lorenz <plor...@gmail.com> wrote:

Paul Lorenz

unread,
May 26, 2009, 9:41:53 PM5/26/09
to sarasvati...@googlegroups.com, sarasvat...@googlegroups.com
Hi Chungonn,
Sorry for the late response, all my time has been taken up with
house repairs :-/

I've added you as a project member. Welcome to the Sarasvati dev team! :)

There's a developer list, I've sent you an invite for. There are also
distribution lists for subversion commits and issue emails, which you
can sign up for, if you're interested.

Please follow the coding style in the wiki and please email the dev
list with some information about larger changes you wish to make (I'll
try to do the same :) ).

let me know if you have any questions.

cheers,
Paul

chun...@gmail.com

unread,
May 26, 2009, 11:18:59 PM5/26/09
to sarasvati-wf-users
Hi Paul,

Thanks. I am glad to be part of the dev team.

Cheers!
chung-onn

On May 27, 9:41 am, Paul Lorenz <plor...@gmail.com> wrote:
> Hi Chungonn,
>   Sorry for the late response, all my time has been taken up with
> house repairs :-/
>
> I've added you as a project member. Welcome to the Sarasvati dev team! :)
>
> There's a developer list, I've sent you an invite for. There are also
> distribution lists for subversion commits and issue emails, which you
> can sign up for, if you're interested.
>
> Please follow the coding style in the wiki and please email the dev
> list with some information about larger changes you wish to make (I'll
> try to do the same :) ).
>
> let me know if you have any questions.
>
> cheers,
> Paul
>
Reply all
Reply to author
Forward
0 new messages