This post was updated on .
Hi All,
I have done below things to integrate liferay with orbeon forms first i have followed two strategies 1.One is with Standalone Orbeon forms setup (Version : 4.4 CE ) 2.Integrate Orbeon forms with liferay (Version : 4.4 CE/PE ) 1. One is with Standalone Orbeon forms setup () Step 1 :I have set up tomcat 7.0 with MySQL DB (5.1) Step 2 : I have configured below properties to connect DB in tomcat/config/server.xml <Context path="/orbeon" docBase="../orbeon.war" reloadable="false" override="true" allowLinking="true"> <Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource" initialSize="3" maxActive="10" maxIdle="20" maxWait="30000" driverClassName="com.mysql.jdbc.Driver" poolPreparedStatements="true" validationQuery="select 1 from dual" testOnBorrow="true" username="root" password="ityug123" url="jdbc:mysql://localhost:3306/orbeon_tomcat?useUnicode=true&characterEncoding=UTF8"/> </Context> Step 3 : Go to /opt/apache-tomcat-7.0.37/webapps/orbeon/WEB-INF/resources/config Rename the 'properties-local.xml.template' to 'properties-local.xml' place it below things <property as="xs:string" name="oxf.fr.persistence.provider.*.*.*" value="mysql"/> <property as="xs:string" name="oxf.fr.persistence.mysql.datasource" value="mysql"/> <property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.*" value="/fr/service/mysql"/> Step 4 : Go to /opt/apache-tomcat-7.0.37/webapps/orbeon/WEB-INF/resources/config/ Place below code in form-builder-permissions.xml <role name="*" app="*" form="*"/> Step 5 : Go to /opt/apache-tomcat-7.0.37/webapps/orbeon/WEB-INF/ <resource-ref> <description>DataSource</description> <res-ref-name>jdbc/mysql</res-ref-name> (Note : JNDI Name 'mysql' must be match with inside server.xml Resource name and value in properties-local.xml) <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> Step 6 : Now inside i have placed authenticated person to created forms for that i have placed <role rolename="orbeon-user"/> <role rolename="orbeon-admin"/> <user username="test" password="test" roles="orbeon-user,orbeon-admin"/> Finally in this approach i have created forms and created forms are stored in My SQL DB and also user name i have configured in tomat-users.xml is stored in my db. Problme in this Approach : Please help me regarding this approach for below things 1.Is there any mechanism to handle different users to create forms like above (without hard coding in tomcat-users.xml) 2.Dynamic users in place of username="dynamicusers" i need to handle different users 3.Or else any container driven or header driven approach to handle users management 4.Or else any mechanism like create account option to users Please help me how to handle these users management in Orbeon Forms ? 2.Integrate Orbeon forms with liferay (Version : 4.4 CE/PE ) In this approach i have followed below things Step 1 : Downloaded orbeon-4.4.1.201401151913-PE and extracted the zip file Step 2 : I have configured MySQL db details in server.xml Step 3 : In Liferay tomcat server i have placed below war files inside ' bundles/deploy' folder - orbeon.war - orbeon -auth.war - proxy-portlet.war Step 4 : Inside bundles/tomcat.6.6/webapps/orbeon/WEB-INF/resources/config/ properties-local.xml <property as="xs:string" name="oxf.fr.authentication.method" value="header"/> <property as="xs:string" name="oxf.fr.authentication.header.username" value="Liferay-Orbeon-User-User-Id"/> <property as="xs:string" name="oxf.fr.authentication.header.group" value="Liferay-Orbeon-User-Group"/> <property as="xs:string" name="oxf.fr.authentication.header.roles" value="Liferay-Orbeon-User-Roles"/ > <property as="xs:string" name="oxf.xforms.forward-submission-headers" value="Liferay-Orbeon-User-User-Id "Liferay-Orbeon-User-Roles"/> <property as="xs:string" name="oxf.fr.persistence.provider.*.*.*" value="mysql"/> <property as="xs:string" name="oxf.fr.persistence.mysql.datasource" value="mysql"/> <property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.*" value="/fr/service/mysql"/> Step 5 : I have logged in my liferay siteand drag and drop the portlet and configured perfectely ,able to create the forms fine and created forms are stored in my db but user name is not storing in orbeon_form_data Problem in this approach : 1.User name and last modified column in MySQL db orbeon_form-data table are not storing anything 2.Actual my requirement is who was logged into my site(liferay website ie.organization) that user information will be able store in my db . 3.How to handle users or how to pass these users information to db 4. In orbeon site i have followed below things in header/container approach http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/form-runner-proxy-portlet-guide#TOC-Configure-the-proxy-portlet 5. Please help regarding to integrate liferay with orbeon forms ? 6 .Is there any customize way in liferay portlet jsp pages or controller classes will able display the formbuilder using web services ? 7. Or else is there any way after click on save to call my liferay portlet controller using web services ? Please help me how to handle perimitted user to allow create forms . Thanks RaaZ . |
Administrator
|
For reference, it seems we are discussing this in 2 separate threads:
Question 1: http://discuss.orbeon.com/LDAP-integration-with-orbeon-forms-td4658133.html Question 2: http://discuss.orbeon.com/Orbeon-Forms-Integraions-with-Liferay-td4658049.html -Erik |
Thank you Erik,
I have followed the ' Header-driven method' and resolved logged in user information to store in orbeon_form_data I have resolved to insert the username and last_modified-by details information in orbeon_form_data Step 1 : Go to Orvbeon Scala Class observer the properties and place it same /opt/SCALA/orbeon/src/main/scala/org/orbeon/oxf/portlet/liferay/LiferaySupport.scala object LiferaySupport { private val HeaderNamesGetters = List[(String, User ⇒ List[String])]( "Orbeon-Liferay-User-Id" → (u ⇒ Option(u.getUserId) map (_.toString) toList), "Orbeon-Liferay-User-Screen-Name" → (u ⇒ Option(u.getScreenName).toList), "Orbeon-Liferay-User-Full-Name" → (u ⇒ Option(u.getFullName).toList), "Orbeon-Liferay-User-Email" → (u ⇒ Option(u.getEmailAddress).toList), "Orbeon-Liferay-User-Group-Id" → (u ⇒ Option(u.getGroup) map (_.getGroupId.toString) toList), "Orbeon-Liferay-User-Group-Name" → (u ⇒ Option(u.getGroup) map (_.getName) toList), "Orbeon-Liferay-User-Roles" → (u ⇒ u.getRoles.asScala map (_.getName) toList) ) Step 2: /opt/My One Click Workspace/bundles/tomcat-6.0.29/webapps/orbeon/WEB-INF/resources/config/properties-local.xml Right Code Snippet : <property as="xs:string" name="oxf.fr.authentication.method" value="header"/> <property as="xs:string" name="oxf.fr.authentication.header.username" value="Orbeon-Liferay-User-Id"/> <property as="xs:string" name="oxf.fr.authentication.header.group" value="Orbeon-Liferay-User-Group-Id"/> <property as="xs:string" name="oxf.fr.authentication.header.roles" value="Orbeon-Liferay-User-Roles"/> <property as="xs:string" name="oxf.xforms.forward-submission-headers" value="Orbeon-Liferay-User-Id Orbeon-Liferay-User-Roles"/> Wrong Code Snippet : <property as="xs:string" name="oxf.fr.authentication.method" value="header"/> <property as="xs:string" name="oxf.fr.authentication.header.username" value="Liferay-Orbeon-User-User-Id"/> <property as="xs:string" name="oxf.fr.authentication.header.group" value="Liferay-Orbeon-User-Group"/> <property as="xs:string" name="oxf.fr.authentication.header.roles" value="Liferay-Orbeon-User-Roles"/> <property as="xs:string" name="oxf.xforms.forward-submission-headers" value="Liferay-Orbeon-User-User-Id Liferay-Orbeon-User-Roles"/> Link to See : http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/form-runner-proxy-portlet-guide#TOC-Configure-the-proxy-portlet Before i have incorrectly configured above properties so that the values like username and last_modified_time are not stored in the orbeon_form_data now with right code its storing everything fine. Thanks, -- RaaZ |
Administrator
|
RaaZ,
Excellent, glad to see it's working now! -Erik |
Free forum by Nabble | Edit this page |