Liferay Workflow With Activiti Plugin - workflow

I am using Liferay Activiti Workflow Plugin to implement workflow. The Activiti Workflow Plugin is a hook. The plugin is working fine. But I have following issues:
How can I make User object for Liferay workflow enabled?
How can I make Custom Entity which has table definition for it in separate schema from 'lportal' Liferay workflow enabled?
I have read this article.
Here it describes one step where we it says to add in liferay-portlet.xml following entry:
<workflow-handler>com.liferay.workflow.ArticleWorkflowHandler</workflow-handler>
But I am using hook which does not have liferay-portlet.xml file. So how should I proceed, what would be the steps?
Thanks in advance.

it's better structure your project modular and define your custom entity as an asset in the different liferay plugin than Activiti Liferay Hook. to do this:
Create a new portlet project and define your Custom Entity in it,
Then you can modify liferay-portlet.xml and point your portlet to your workflow handler.
also notice if in this way you need to call Activiti Jars. you can move them from lib directory of Liferay Activiti Hook to the global lib directory(in Tomcat it place here: ${TOMCAT_HOME}/lib ).
but if you really need to define your custom entities in the Liferay Activiti Project itself, first add a portlet to it. remember that a Liferay project can consist of several liferay plugin(such as hook portlet...). to do this. it's better to import its source to an IDE like eclipse then create a portlet on it and do what you want

Related

How to change the default data-source in activiti BPM?

I would like to change the default data-source to oracle. So as per the user guide another database the db.properties in the WEB-INF/classes of the Activiti Explorer web application should be changed if i change the db.properties again i need to create .war file, correct ? How to i create the activiti-explorer.war file ? Or Is there any options for change it from explorer ? Please advise
I dont know the Activiti Explorer well, but you can build your war file from the activity sources.
Its a simple maven project and should be quite easy.
Have a look to the Activiti Documentation here: http://docs.codehaus.org/display/ACT/Developers+Guide#DevelopersGuide-Buildingthedistribution
BTW: I use Activiti embedded to spring framework using the spring-activiti extension... works like a charm.
No need to create WAR again you just put your war in server(tomcat or any other server) and start the server then it will generate an application folder parallel to war file in web-apps folder.
Change the db.properties in application folder generated in web-apps and restart the server.
changes in db.properties will reflect in web application.

Liferay Hooks plugins folder

I am using Liferay 6 version.
I am trying to Learn Liferay, due to its importance.
I am into the Liferay Hooks concept, for this I am following this site:
http://kamalkantrajput.blogspot.com/2009/05/using-hooks-in-liferay-for-customizing.html
In this the author mentions about this below:
Go to plugins/hooks create a folder with any name. eg asset-publisher-hook
Please tell me where can i find the plugins folder?
Because inside the Liferay Tomcat, I found 6 folders with the name plugins and no folder hooks under this .
Please guide me.
You might also want to read the documentation in the Liferay Wiki:
http://www.liferay.com/community/wiki/-/wiki/Main/Portal+Hook+Plugins
In a Nutshell: once you have created the hook plugin (as described by adarshr) you can simply deploy the portlet like any other portlet.
If you want to remove the hook, make sure to undeploy it while Tomcat is running. Otherwise Liferay will not be informed about it and the original JSPs won't be restored.
Un-deploying can be done by simply deleting the portlet's directory in the Tomcat webapps folder.
You need to install the Plugins SDK which can be downloaded from http://www.liferay.com/downloads. Select "Plugins SDK" in the dropdown and click download.
Once you extract it, open a command prompt in the hooks folder. Then you execute the command create asset-publisher-hook "Asset Publisher Hook" and it will create the basic hooks project for you.

How to configure a portlet in CQ5 by war file

I am trying to configure to use CQ as a portal. I am referring to the link for Using CQ as a Portal : http://dev.day.com/docs/en/cq/5-3/administering/cq_as_portal.html
I have followed all these steps
Configure the portlet component in CQ WCM
Deploy the portlet.
Configure the portlet.
But after deploying the portlet when i add portlet component to page by dragging the Portlet component from the sidekick ,
it is giving the error message as "Configuration for portlet entity identifier is missing" and when editing it .
It should give the portlet created i.e .war files uploaded in the portlet entity drop down list of portlet component, but not giving any entry in the list .
Please help me with the portlet configuration if i missed some step or if there is some alternate way.
Thanks
You need to upload the .war file into the CQSE admin (i.e. http://localhost:4502/admin) in order to make them appear in the list.
You'll also need to make sure that if you are using Eclipse Maven to make your .war file that it has the right settings in the portlet.xml file - the portlet class is wrong by default although that doesn't stop it appearing in the list.

Issue making a Liferay Hook with Eclipse Liferay IDE - getting only empty project

I am using Eclipse Liferay IDE for making a hook to a Liferay native portlet. I mean a porlet that comes with default installation, eg. blogs, content management or similar.
I have done the steps like following:
Select new Liferay Project
Enter project name MyHook
Made configurations (found an SDK directory and Liferay Server instance for Runtime)
Selected Plugin type to Hook
My only option after that was Finish and I ended up having a project with certain structure without any class or properties file inside.
My problem is that I could only get an empty project and don't know how to make the modifications to the files of Liferay because no Liferay originated package names can be found if I make a new class file and try to start typing com.Liferay. or org.Liferay. Because this is a Liferay Hook project, I suppose some Liferay originating tips should normally pop up for my selection, but I didn't see any.
What I am making wrong? What I am missing? Should I know the filenames by myself or is there a trick somewhere to tell the IDE to give me some help?
I use Liferay 6.0 and my IDE version is 6.0.5. At least in my eyes they should match together.
In the IDE you first create a "Liferay Hook Project". This is indeed an empty project. Then you create a Hook, select the Hook project to create it in. You can do the second step manually, but there's a wizard helping you to do this. This might be what you've been missing
I made the same steps again and it worked! Somehow at first time I managed to do a Java project although the project should be interpreted as a Liferay project.
Maybe the IDE is not 100% working always. Whoever knows.

Alfresco - Using APIs in a new project

I wanted to know if a new project in eclipse we could import the jar Alfresco and used for example by creating just a jsp with a field of research that would seek a metadata ..?
Thank you.
I think you got it wrong. Alfresco is not library you import to your project. Alfresco is a complete Enterprise Content Management system. For more information visit http://wiki.alfresco.com/wiki/Main_Page
But I wish it was that simple.
I think this way to do it:
Install alfresco from scratch... as standalone project.
Then develop a webscript using the Alfresco Web Script API, that allows you to create a restful service. Your web script can preform lucene queries to search metadata.
Create your jsp form.
Then you can use Ajax to get data from your restful service.