Grails and Activiti integration

617 views
Skip to first unread message

Nat

unread,
Aug 31, 2012, 7:42:17 AM8/31/12
to grails-acti...@googlegroups.com
Hi Lim,

I would like to integrate the Grails web framework with Activiti Workflow. Something like leave mgmt application. which is explained in the Grails-Activiti plug-in example.But i'm not finding any clue how exactly it's integrated. So could you please show the direction with respect to the implementation perspective.

Thanks in advance for your time,
Nat 

Chee Kin Lim

unread,
Aug 31, 2012, 10:33:11 PM8/31/12
to grails-acti...@googlegroups.com
Hi Nat,

Thanks for your interest to the plugin.

Activiti was BPM engine, the workflow process is drive by process definition known as BPMN 2. You can create such process definition using Activiti Designer. Please see the Activiti User Guide for installation of Activiti Designer and BPMN 2 notations supported by Activiti.

Behind the scene, it is org.activiti.spring.SpringProcessEngineConfiguration made seamless integration to Grails without much effort from me.

The plugin introduced it own API, commands and scaffolding mainly to simplify Activiti the Grails way especially for external form rendering. It implicitly using process id of BPMN as controller and userTask id of BPMN as controller's action and override by a value specified in "activiti:formKey" attribute.

Hope this help.

Best regards,
Chee Kin


--
 
 
 

Nat

unread,
Sep 4, 2012, 8:12:38 AM9/4/12
to grails-acti...@googlegroups.com
Hi Lim,

Thanks a lot for your time and reply. I have created work flow using BPMN2.0(eclipse plugin). But not able to invoke the Acitiviti process flow from the external form(simple JSP form). The Acitiviti action document is bit advanced, so i'm not able to find the exact information from that guide. It would be great if you could provide simple example for this flow( JSP form has Name,Leave date,reason, so once i press the submit button it has to invoke the Activiti process(workflow) -user task)

Thanks a lot,
Nat

Chee Kin Lim

unread,
Sep 4, 2012, 10:26:59 AM9/4/12
to grails-acti...@googlegroups.com
Hi Nat,

Oh I see, you want to render external JSP form. To implement external form rendering, you need to understand that it is your web app driving the URL routing for which view to display for the given userTask, not the other way round.

In the bpmn20.xml file, you can specified the JSP form URI in "activiti:formKey" attribute and use FormService.getTaskFormData(taskId).getFormKey() to retrieve the URI and route the http request to the specified URI.

As the form URI maybe dynamic, your web app need to construct the URI dynamically, it is the approach implemented by the plugin in ActivitiService class at https://github.com/limcheekin/activiti/blob/master/src/groovy/org/grails/activiti/ActivitiService.groovy#L171


Hope this help.

Best regards,
Chee Kin




On Tue, Sep 4, 2012 at 8:12 PM, Nat <natar...@gmail.com> wrote:
Hi Lim,

Thanks a lot for your time and reply. I have created work flow using BPMN2.0(eclipse plugin). But not able to invoke the Acitiviti process flow from the external form(simple JSP form). The Acitiviti action document is bit advanced, so i'm not able to find the exact information from that guide. It would be great if you could provide simple example for this flow( JSP form has Name,Leave date,reason, so once i press the submit button it has to invoke the Activiti process(workflow) -user task)

Thanks a lot,
Nat


On Saturday, September 1, 2012 8:03:12 AM UTC+5:30, Chee Kin Lim wrote:
Hi Nat,

Thanks for your interest to the plugin.

Activiti was BPM engine, the workflow process is drive by process definition known as BPMN 2. You can create such process definition using Activiti Designer. Please see the Activiti User Guide for installation of Activiti Designer and BPMN 2 notations supported by Activiti.

Behind the scene, it is org.activiti.spring.SpringProcessEngineConfiguration made seamless integration to Grails without much effort from me.

The plugin introduced it own API, commands and scaffolding mainly to simplify Activiti the Grails way especially for external form rendering. It implicitly using process id of BPMN as controller and userTask id of BPMN as controller's action and override by a value specified in "activiti:formKey" attribute.

Hope this help.

Best regards,
Chee Kin

On Fri, Aug 31, 2012 at 7:42 PM, Nat <natar...@gmail.com> wrote:
Hi Lim,

I would like to integrate the Grails web framework with Activiti Workflow. Something like leave mgmt application. which is explained in the Grails-Activiti plug-in example.But i'm not finding any clue how exactly it's integrated. So could you please show the direction with respect to the implementation perspective.

Thanks in advance for your time,
Nat 

--
 
 
 

--
 
 
 

Krushal Gajjar

unread,
Jun 27, 2014, 1:39:12 PM6/27/14
to grails-acti...@googlegroups.com
Hi All,

Please tell me all the steps one by one because i am creating activiti bpm process with external jsp pages
I am giving jsp page name in attribute:formkey="sample.jsp" like this 
I also attach jsp pages with bpmn20.xml file in .bar file and then upload the process
But i can not see my jsp page rendered and i can only see default form view of activiti

Please help me i am in very critical situation

Regards
Krushal

roozbeh goodarzi

unread,
Jan 31, 2015, 9:42:37 AM1/31/15
to grails-acti...@googlegroups.com
Dear All
The same story as Krushal has is happened to me pls somebody give us a clear definition that why it happens or what should we do.
Thank you in advance.
Reply all
Reply to author
Forward
0 new messages