[jboss-user] [jBPM] - Form Builder Setup

Mauricio Salatino do-not-reply at jboss.com
Thu Jul 26 03:11:46 EDT 2012


Mauricio Salatino [https://community.jboss.org/people/salaboy21] modified the document:

"Form Builder Setup"

To view the document, visit: https://community.jboss.org/docs/DOC-18940

--------------------------------------------------------------
This wiki describe the steps to set up in your local environment the jBPM form builder:

1. Download JBoss AS 7.1.1 -> http://www.jboss.org/jbossas/downloads/
2. Check fork/clone master (https://github.com/droolsjbpm/jbpm-form-builder/) and compile with mvn clean install
3. Copy jbpm-form-builder/target/jbpm-form-builder-5.4.0-SNAPSHOT.war to standalone/deployments and rename it to jbpm-form-builder.war
4. inside the standalone.xml file add a security domain for the form builder

 <security-domain name="jbpm-form-builder" cache-type="default">
                    <authentication>
                        <login-module code="UsersRoles" flag="required">
                            <module-option name="usersProperties" value="${jboss.server.config.dir}/users.properties"/>
                            <module-option name="rolesProperties" value="${jboss.server.config.dir}/roles.properties"/>
                        </login-module>
                    </authentication>
                </security-domain>
 
 



 5. inside /standalone/configuration/ create two files: users.properties 
admin=admin
salaboy=salaboy
krisv=krisv
john=john
mary=mary
sales-rep=sales-rep


and roles.properties:


admin=admin,manager,user
salaboy=admin,manager,user
krisv=admin,manager,user
john=admin,manager,user,PM
mary=admin,manager,user,HR
sales-rep=admin,manager,user,sales






6 .Start your application Server  :) 

There are some extra configuration points just for you to know

Inside the springComponents.xml file you will find a configuration for the Settings Service, one implementation for JTA environments like JBoss and another one for Serverl Containers like Tomcat and Jetty:



<!--  <bean id="SettingsService" class="org.jbpm.formbuilder.server.settings.DBSettingsService">
    </bean>-->
    <!-- JTA JBoss DBSettings Service -->
    <bean id="SettingsService" class="org.jbpm.formbuilder.server.settings.JTADBSettingsService">
    </bean>


The same for the persistence.xml to work with JBoss:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" 
             xmlns="http://java.sun.com/xml/ns/persistence" 
             xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd">

  <persistence-unit name="form-builder" transaction-type="JTA">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
    <mapping-file>META-INF/Settingsorm.xml</mapping-file>
    <class>org.jbpm.model.formapi.client.SettingsEntry</class>
    <class>org.jbpm.model.formapi.client.Settings</class>
  
    <properties>
      <!-- testing with H2 in memory -->
      <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
     

      <property name="hibernate.connection.autocommit" value="true" />

      <property name="hibernate.max_fetch_depth" value="3"/>
      <property name="hibernate.hbm2ddl.auto" value="update" />
      <property name="hibernate.show_sql" value="true" />
      <property name="jboss.entity.manager.factory.jndi.name" value="java:jboss/myEntityManagerFactory" />
    </properties>
  </persistence-unit>
</persistence>





You can also deploy the Example Client provided by the jBPM Form Builder Github repository to have a quick consumer for your forms:
Once you deploy the application the FormHostServlet receives a parameter called formName which is the one used to go and pick the form and render it in the current application:



http://localhost:8080/jbpm-form-builder-client-example/FormHostServlet?formName=ExampleForm

Attached the example form used in the post: http://salaboy.com/2012/07/25/jbpm-form-builder-state-of-the-art/
--------------------------------------------------------------

Comment by going to Community
[https://community.jboss.org/docs/DOC-18940]

Create a new document in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120726/d1801be1/attachment.html 


More information about the jboss-user mailing list