Configure an Activiti BPM? - grails

I want to know that how to configure/run Activiti BPM in Grails?? I'm using fedora as my OS, Grails 2.1 . If their is any tutorial websites are is plz mention it also..

There is a plugin for Grails applications that provides much of Activiti within a Grails app. http://grails.org/plugin/activiti However, development has sadly stopped on it by the main developer. The last update was for Activiti 5.9 and Grails 2.1, though much of the plugin content seems to be built for older versions of Grails; for example, actions in the plugin's TaskController are all closures, not methods. Also, someone did issue a pull request to update it to 5.10.
I've been trying to puzzle through the source for that plugin myself. I keep vacillating between simply setting up a standalone Activiti server and utilizing the RESTful API from within a Grails Service class, importing a few of the Activiti classes into my Grails app, or trying to re-engineer the plugin to suit my needs (my site is stuck on Grails 2.0.1 for the time being).

Related

[grails 3]: Replacement of doWithWebDescriptor on Plugin descriptor?

We are trying to move our existing grails 2.5 application to newer versions of grails. For that adopting strategy to first upgrade to grails 3.3.11 (latest in 3.x releases) and then move to grails 4.
For one of the feature from grails 2.5.6 application, I found that there is nothing documented anywhere or may be I've missed that part on the document! It is about Plugin descriptor's doWithWebDescriptor. With this closure we can able to update web.xml dynamically based on some rules.
After upgrading to grails 3, I found that doWithWebDescriptor is not working. It is not initializing task which it supposed to (as far as grails 2.5 concerned). Later I found that there is nothing documented after grails 3.0 documentation.
If doWithWebDescriptor is removed then what is the best suitable replacement with grails 3 or latest grails 4 edition? If it still working fine and there is some configuration related changes required with grails 3 then kindly point me to that part.
Update:
Reason why we need doWithWebDescriptor is that, we are trying to add servlet based on the plugin. Actually we have several plugins for different modules in the application. Not all plugins included in the project. Based on modules selected we are adding plugin to the application. So if a plugin is included then we need to add servlet and a filter to web.xml.
Thank you.
Reason why we need doWithWebDescriptor is that, we are trying to add
servlet based on the plugin.
You can add a servlet by registering a ServletRegistrationBean in the application context. You can do that in the plugin's doWithSpring method or in the app's resources.groovy. Example:
Closure doWithSpring() {{->
myServlet(ServletRegistrationBean, new MyServlet(), "/myServlet/*") {
loadOnStartup = 2
}
}}
We have documented this in the 18.5 Hooking into Runtime Configuration section at http://docs.grails.org/3.3.11/guide/plugins.html#hookingIntoRuntimeConfiguration.

Grails: Contract first soap web service with cxf is not working

Publishing contract first web services in Grails using cxf is not working with the following.
http://docs.codehaus.org/pages/viewpage.action?pageId=85983334. I could not find any other useful resources on this problem. Using spring-ws may not be a good idea because I don't want to create end points for each element.
Please share some resources if anybody succeeded in publishing web service using cxf in Grails?
Setup:
Grails 2.0.0
cxf - 2.4.1
Grails-cxf - 0.5.1 (Latest is not working)
Groovy - 1.7.6
I've used http://grails.org/plugin/cxf in several projects. It works great for me. What exactly goes wrong when you try?

Which is the best way to include Grails into Liferay?

I'm trying to include Grails applications into a Liferay portlet. I tried the Grails Liferay Portlets Plugin but it did not work for me at all.
Does anybody know any other possibilities? Which do you think is the best and why?
We had our Grails project integrated with Liferay at one point but it was a mess. Inevitably we pulled it out of Liferay and we were able to use Grails properly again. In our instance the question became, why are we using Liferay and do we really need it?
Now if you have a requirement for Liferay you might try simply using Spring Portlet support and use parts of Grails you like but not fully integration. Spring Portlets with Groovy were much easier and cleaner to do. If you simply want Grails goodies for services etc. you can try deploying a Grails WAR on the same tomcat and expose services to your portlets through REST, Hessian, Burlap or some other easy service serialization mechanism in Spring/Grails. In this case you have a Liferay UI app that calls your Grails services.
Once again, try some options, then decide if you truly need (or have) to use Liferay. With advances in Javascript UI packages, I'm not sure 'portlet' spec apps are as appealing as they once were and the word 'portal' is something that sounds good to management but inevitably means little to what needs to be implemented.

What is a Grails Plugin? What does it mean to Install a Plugin?

I used Grails recently, and added Grails plugin for JQuery, but I don't think it did anything more than just copy some jQuery files over.
So far, I have seen info only on 'how to install and use' plugins...but I can't find anything that describes the concept of a plugin.
Can somebody please tell me, what is a Grails Plugin? And what does it mean to 'Install' a plugin?
A Grails plugin is (or should be) a self-contained bundle of functionality that can be installed into a Grails application. When a Grails plugin is installed, it can do any of the following:
define additional Spring beans
modify the generated web.xml
add new methods to the application's artefacts (controllers, domain classes, services, etc.)
provide new tag libraries
make additional resources and classes available to the application
provide new Grails commands
For example, when you install the JQuery plugin
the JQuery JavaScript files are added to the application
a new Grails tag <jq:jquery> is added to the application
a new Grails command grails install-plugin jquery is added to the application
When you install a Grails plugin, that plugin's functionality is made available to the installing application. However, the plugin itself is not actually copied into the application, only the plugin name and version is added to the application's application.properties file. The plugin itself is downloaded to $HOME/.grails and the application loads it from there.
The structure of a Grails plugin project is identical to that of a Grails application, with the exception of a configuration file (known as a plugin descriptor) that is included in a plugin's root directory.
Well, a Grails plugin is some piece of software that extends the frameworks funcionalities in some manner. Generally, installing a plugin in Grails means copying it to your Grails folder, so projects can refer to it and Grails will know where to find it.
Grails plugins have this folder structure:
grails-app
controllers
domain
taglib
service
etc
lib
src
java
groovy
web-app
js
css
So anything it has there will also be available to the application that uses it. For example, the Searchable plugin has a service class which you can use to perform advanced searchs in your own domain classes .
The jQuery plugin you mentioned has the jQuery .js file, and a tag to include that file.
For information on creating plugins, see http://grails.org/doc/latest/guide/12.%20Plug-ins.html
A plugin is just a set of functionality around a desired purpose. So the Spring Security plugin provides a way to lock down your app, assign roles to users, restrict access, whatever. The Searchable plugin allows you to integrate advanced searching into your app. There are lots of plugins
The point is to provide useful functionality so that you don't have to implement hard things yourself. Someone did something useful, and they wanted to contribute back to the community, so they organized their functionality and made it available.
A plugin is code and configuration, like any functionality you would implement yourself.
There is some documentation here: http://grails.org/doc/latest/ref/Plug-ins/Usage.html

Suggested Grails plugins to make Grails a good CMS option

We are trying to look for plugins for Grails to make a CMS site. Any suggestions?
Check out Weceem at
http://www.weceem.org/weceem/
I've never used it but apparently it can be used as a stand-alone site or integrated into an existing grails app as a plugin.
There is also Alfresco plugin, though it's likely more focused on the document management side of Alfresco (it allows both Document Management and Web Content Management).

Resources