Simple workflow app example?

1,007 views
Skip to first unread message

SebastianS

unread,
Jul 22, 2010, 5:32:37 AM7/22/10
to Grails Activiti Plugin Discussion Forum
Hi,

I'd like to take a look at your plugin, but I'd appreciate it if you
could give me some instructions on using it. Could you explain, how
would you go about creating a very simple workflow application (with
forms for capturing user data) with it? Suppose I modeled a simple
process in Activiti-Modeler that goes like this:

1. Start
2. User task form for entering some data (whatever)
3. Displaying results (whatever)
4. End

In Activiti BPMN 2.0 XML I just create activiti:form elements, and
respective .form files. That's how it works when starting the process
in Activiti-Explorer. How can this be done in Grails programatically?

Best regards,
Sebastian

limcheekin

unread,
Jul 22, 2010, 6:13:24 AM7/22/10
to Grails Activiti Plugin Discussion Forum
Hi Sebastian,

Thanks for interest in grails-activiti-plugin and your great idea and
suggestion. I did think of create a simple sample workflow application
for the plugin (For example, user can install the sample application
using "grails install-sample-application".) to show the plugin user
how to write workflow application using the plugin.

The initial thought for the sample application is based on Activiti's
use case at URL below:
http://activiti.org/userguide/index.html#bpmnFirstExampleUseCase

My idea for integration to grails views is by specify relative URL at
activiti:form attribute of the userTask element as Activiti's
documentation mentioned that "you could fill in the form attribute
with any text value that you want if you are not using Activiti
Explorer." at http://activiti.org/userguide/index.html#taskForms

We welcome your suggestion for use case of the sample application and
better still you can join the grails-activiti-plugin project to work
out the sample application for the plugin.

Wish to hear from you soon!

Regards,
Chee Kin

limcheekin

unread,
Jul 22, 2010, 9:55:20 PM7/22/10
to Grails Activiti Plugin Discussion Forum
Hi Sebastian,

Please see my reply below.

> Yeah, the same idea occurred to me, but then again I'm thinking if mapping of the form variables would be straight-forward (getting them from GSP form and using
> setVariable() method on Activiti process instance within some Grails controller action) or not. What do you think?
I not so sure what you means. Few lines of code may help to understand
your idea.

> And thanks for the invitation to join the plugin sample application team. I see how much free time do I have, and get to you later.
Sure. Wish to hear from you soon!

> Regards,
> Sebastian

On Jul 22, 6:13 pm, limcheekin <limchee...@vobject.com> wrote:
> Hi Sebastian,
>
> Thanks for interest in grails-activiti-plugin and your great idea and
> suggestion. I did think of create a simple sample workflow application
> for the plugin (For example, user can install the sample application
> using "grails install-sample-application".) to show the plugin user
> how to write workflow application using the plugin.
>
> The initial thought for the sample application is based on Activiti's
> use case at URL below:http://activiti.org/userguide/index.html#bpmnFirstExampleUseCase
>
> My idea for integration to grails views is by specify relative URL at
> activiti:form attribute of the userTask element as Activiti's
> documentation mentioned that "you could fill in the form attribute
> with any text value that you want if you are not using Activiti
> Explorer." athttp://activiti.org/userguide/index.html#taskForms

RichardP

unread,
Aug 4, 2010, 10:39:49 AM8/4/10
to Grails Activiti Plugin Discussion Forum
Hi,

in my honest opinion the plugin requires support for gsp forms to be
successful!
What else is the plugin doing for someone what Activiti can't do?
Starting processes, claiming and performing tasks is easy, but already
in Activiti itself. The true added value is integration in real
applications build with grails.
I wonder how we could get this to work. If it is possible to declare a
URL in the form specification and we can use this to start a form it
would be great!

greetings,
Richard

limcheekin

unread,
Aug 5, 2010, 5:38:11 AM8/5/10
to Grails Activiti Plugin Discussion Forum
Hi Richard,

Thanks for your opinion, I plan to include a sample application with
gsp integration on next release of the plugin. By the way, any
suggestion for the sample application?

Regards,
Chee Kin

limcheekin

unread,
Aug 6, 2010, 2:13:35 AM8/6/10
to Grails Activiti Plugin Discussion Forum
Hi,

For your information, I think incident management is appropriate
process for the sample application implementation.

You can find out more about the incident management process at
http://www.bpm-guide.de/2010/07/15/bpmn-2-0-am-beispiel-incident-management/
and look at the comment section of the post for message I sent to
Jakob Freund.

Regards,
Chee Kin

Sebastian Stolarczyk

unread,
Aug 6, 2010, 3:38:45 AM8/6/10
to grails-acti...@googlegroups.com
Hi,

I think it's a good idea, but the process described here is in my opinion also very good for the start (Quote Processing):

http://www.activevos.com/start-here-sample-apps.php

Plus a good case study:

http://www.activevos.com/dev/sampleapps/quoteDesignGuide/Doc/DesignGuide.html

What do you think?

Regards,
Sebastian

2010/8/6 limcheekin <limch...@vobject.com>

RichardP

unread,
Aug 7, 2010, 4:39:34 AM8/7/10
to Grails Activiti Plugin Discussion Forum
Hi Sebastian,

the Quote Processing example looks like a good process to show the
integration level with grails.
I'm not sure though if we need to do something with the rules engine
here, which is part of the example.

Another good and simple example would be a simple order entry and
order processing application.
It would have user tasks with forms (order entry) and tasks performed
by the system (modify inventory, send invoice to customer).

greetings,
Richard


On 6 aug, 09:38, Sebastian Stolarczyk <sebastian.stolarc...@gmail.com>
wrote:
> Hi,
>
> I think it's a good idea, but the process described here is in my opinion
> also very good for the start (Quote Processing):
>
> http://www.activevos.com/start-here-sample-apps.php
>
> Plus a good case study:
>
> http://www.activevos.com/dev/sampleapps/quoteDesignGuide/Doc/DesignGu...
>
> What do you think?
>
> Regards,
> Sebastian
>
> 2010/8/6 limcheekin <limchee...@vobject.com>
>
>
>
> > Hi,
>
> > For your information, I think incident management is appropriate
> > process for the sample application implementation.
>
> > You can find out more about the incident management process at
>
> >http://www.bpm-guide.de/2010/07/15/bpmn-2-0-am-beispiel-incident-mana...

Sebastian Stolarczyk

unread,
Aug 7, 2010, 4:45:18 AM8/7/10
to grails-acti...@googlegroups.com
Hi Richard,

You have a point. My example indeed made use of Drools as it's rule engine. Hence, order process would be a better example to start with. The question is how we can make Grails view the user task forms (I believe moving the process further would be straightforward using the Activiti API in Grails controllers).

Regards,
Sebastian

2010/8/7 RichardP <rili...@gmail.com>

RichardP

unread,
Aug 7, 2010, 6:15:33 AM8/7/10
to Grails Activiti Plugin Discussion Forum
Hi Sebastian,

Some time ago I was looking at the jBPM plugin for grails.
Unfortunately the plugin didn't work with the newer versions of Grails
and jBPM.
I decided to try something for myself: I created a controller which is
able to complete tasks: if it is able to find a controller with the
name of the process and a task with the name of the current task, it
redirects to controller/task to perform the task.
If the controller/task is not found, it just completes the task. The
latter part is not correct, because when we define the tasks well in
the process, we know when a User Task expects a form, so we should
give an error when we don't have one.
But it's about the idea: By convention we create a controller for each
process, which handles all the tasks for that process, making use of
the domain classes to hold al the data. In the processes we don't have
to hold much data, only ID's of domain objects and data needed for the
process itself are stored in de workflow engine.
The controllers should make use of the services defined in the plugin.
The generic controller should be part of the plugin.

Does that sound like a good idea?

greetings,
Richard

On 7 aug, 10:45, Sebastian Stolarczyk <sebastian.stolarc...@gmail.com>
wrote:
> Hi Richard,
>
> You have a point. My example indeed made use of Drools as it's rule engine.
> Hence, order process would be a better example to start with. The question
> is how we can make Grails view the user task forms (I believe moving the
> process further would be straightforward using the Activiti API in Grails
> controllers).
>
> Regards,
> Sebastian
>
> 2010/8/7 RichardP <rilis...@gmail.com>

limcheekin

unread,
Aug 9, 2010, 10:42:42 PM8/9/10
to Grails Activiti Plugin Discussion Forum
Hi Sebastian and Richard,

Thanks for given great ideas for the sample application of the grails
activiti plugin.

After well consideration, I decided to create the sample application
based on Vacation Request process described in Activiti's
documentation at http://activiti.org/userguide/index.html#taskForms.

The decision made due to the following reasons:
1) The Vacation Request process is simple and good enough to show how
to use the plugin and Grails-Activiti integration.
2) The Activiti user community is familiar with the Vacation Request
process.

The sample application can be installed by the plugin user using
command "grails install-vacation-request-sampleapp".

I will keep you inform when the code of sample application committed
to source repository and ready for review.

Also, you may want to create different sample applications by using
the grails activiti plugin, which is highly appreciated.

Fyi, the same message above will reply to Jakod from Camunda (as he
contacted me).

Below is his e-mail message and message I posted to his blog post (had
been removed from the blog post) for your reference:
Jakod e-mail message:
------------------------------
ok, we just had our little kick-off meeting. We have decided to build
the showcase in short iterations, keeping it really slim in the first
place.

This means, we will implement a first version this week, only
containing a part of the upper branch of the Technical Pool (see image
below). Next Monday we’ll have a short review, and then go on. Small
Steps though ;-)

Because we want to keep it slim, we will implement the forms with the
form builder integrated in Activiti, not using “external” frameworks
such as Grails.

Question now is, what does it mean for you? Maybe you want to take our
“slim” showcase and then extend it with features that use Grails? I
could also imagine that we do that ourselves, using your Plug-in, but
1) I cannot say right now when we will do that and 2) maybe you want
to do it on your own.

Maybe you even want to implement the whole example on your own, which,
as I already said, you can do, of course. In that case, it would be
only nice if you could give us some credits when you publish it, i.e.
mentioning that it is based on the example we provided.

What do you think of all that?

My message posted to his blog post:
--------------------------------------------------
I am project owner of Grails Activiti Plugin (http://code.google.com/p/
grails-activiti-plugin/), I think incident management is appropriate
process to implement for sample application of the plugin, you can
find out more about sample application discussion at
http://groups.google.com/group/grails-activiti-plugin/browse_thread/thread/fbacae1410447321

I would like to seek your permission to implement the sample
application by using the bpmn.xml file you published in this post at
http://www.bpm-guide.de/wp-content/uploads/2010/07/engine-pool.xml.
Also, it is highly appreciated that if your company can contribute the
source codes of incident management example (I saw something like
'com.camunda.examples.incidentmanagement.ProductBacklog' in the
bpmn.xml file) to the plugin project as sample application.

It is understood that some amendments and adaptations are required to
make the source codes and bpmn.xml file to work with Activiti and
Grails.

Any feedback from you are welcome.

Wish to hear from you soon!


RichardP

unread,
Aug 23, 2010, 4:47:16 AM8/23/10
to Grails Activiti Plugin Discussion Forum
Hi Chee Kin,

are you making any progress?

greetings,
Richard

On 10 aug, 04:42, limcheekin <limchee...@vobject.com> wrote:
> Hi Sebastian and Richard,
>
> Thanks for given great ideas for the sample application of the grails
> activiti plugin.
>
> After well consideration, I decided to create the sample application
> based on Vacation Request process described in Activiti's
> documentation athttp://activiti.org/userguide/index.html#taskForms.
> find out more about sample application discussion athttp://groups.google.com/group/grails-activiti-plugin/browse_thread/t...
>
> I would like to seek your permission to implement the sample
> application by using the bpmn.xml file you published in this post athttp://www.bpm-guide.de/wp-content/uploads/2010/07/engine-pool.xml.
> ...
>
> meer lezen »

limcheekin

unread,
Aug 23, 2010, 10:15:55 AM8/23/10
to Grails Activiti Plugin Discussion Forum
Hi Richard,

Thanks for writing.

An issue is pending, you can find out more at http://jira.codehaus.org/browse/ACT-82

Regards,
Chee Kin
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages