Graph without XML definitions

28 views
Skip to first unread message

Dave Butz

unread,
Dec 9, 2009, 3:53:21 PM12/9/09
to sarasvati-wf-users
Hi

We want to load all our process definitions out of a DB and do not
want to use a XML file. Is it possible then to use the MemEngine or do
we have to write our own CustomEngine with usage of Sarasvati Engine
interface?

Thanks

Paul Lorenz

unread,
Dec 9, 2009, 4:52:03 PM12/9/09
to sarasvati...@googlegroups.com
Hi Dave,
  I don't think this works in RC2. However, I just refactored the code and it now works in trunk. You can load XML->DB and DB->memory using the HibEngine and then use a MemEngine to start and run processes. I created a new example you can run from HybridExampleConsole to try it out. I did minimal testing (ran one process through, start to finish), so there may still be bugs there to flush out. If you run into any, let me know.

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.



Dave Butz

unread,
Dec 10, 2009, 4:35:42 PM12/10/09
to sarasvati-wf-users
Hi Paul

Thanks for your fast reply.
The main issue is that we have already our own Graph/Node/Arc
structure and we do need a way to load/wrap them in to your WF-Engine.
Is it correct, that we need to implement an own implementation of
BaseEngine (analogue to HibEngine / MemEngine)? We can perfectly live
with HibEngine handling the process instances but we need a custom way
for loading graphs.

thanks,
Dave
> > sarasvati-wf-us...@googlegroups.com<sarasvati-wf-users%2Bunsubs­cr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/sarasvati-wf-users?hl=en.- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Paul Lorenz

unread,
Dec 10, 2009, 4:57:31 PM12/10/09
to sarasvati...@googlegroups.com
Hmmm, now I'm not quite certain what you are asking. Let me list some component pieces and maybe you can fill in the detail of what you're trying to do.

1. GraphLoader takes ProcessDefinition (XML or otherwise) and using the GraphFactory, creates Graph instances in the GraphRepository.

2. You can then pull Graph instances from GraphRepository.

3. Given a Graph instances you can create a GraphProcess using the GraphFactory

4. The Engine can then execute the GraphProcess (using GraphFactory again to generate tokens).

So if you have your own graph/node/arc structure, you could
  1) implement the graph/node/arc interfaces in your classes
  2) Create Graph/Node/Arc adapters which wrap your classes (I would think you could subclass the Mem... classes for this)
  3) You might not need to do either, you could maybe just create MemGraph/MemNode/MemArc arcs to mimic the structure you have and then have only the nodes call into your custom logic.

Anyway, you shouldn't _need_ to subclass BaseEngine, but you could subclass MemEngine to override the getRepository method.

So, let me know if any of that helps, and if not, maybe you can fill in some more details of what you're trying to accomplish.

cheers,
Paul

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

Dave Butz

unread,
Dec 13, 2009, 8:23:28 AM12/13/09
to sarasvati-wf-users
Hi Paul

We will try to adopt your input this week and let you know if it
works. Thanks again four your advice.

regards,
Dave
Reply all
Reply to author
Forward
0 new messages