[jBPM Users] - Dynamic Variable Assignment
by StevenMayhew
Hi all,
Just a quick question - I'm wondering about using jBPM/jPDL for a project which I am currently working on - so far reading through the documentation I haven't found an easy way to use variables that are found through database call etc, I was wondering if I am just missing something.
For example (very basically) I would have a process to insert a sale for an object - I wish for the list of objects for sale to be populated from a database onto the page so that someone can choose them from say, a drop down list.
Is there any way to do this, or am I just missing something major. I see that I can create this sort of thing statically in the XML in my process definition, but I need to be able to do it dynamically.
Cheers,
Steven
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269193#4269193
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269193
16 years, 4 months
[jBPM Users] - Re: why i can't use identityService in jbpm4
by optixpro
"saraswati.santanu" wrote : It will be helpful if you can provide a little more information. NullPointerException is too common and generic to come to any conclusion. Please provide the jbpm.cfg.xml, a snippet of the jpdl and a snippet of your code to execute that.
|
| Typically processEngine.getIdentityService() should give you the indentity service.
jbpm.cfg.xml
<?xml version="1.0" encoding="UTF-8" ?>
| <jbpm-configuration>
| <import resource="jbpm.default.cfg.xml" />
| <import resource="jbpm.businesscalendar.cfg.xml" />
| <import resource="jbpm.tx.hibernate.cfg.xml" />
| <import resource="jbpm.jpdl.cfg.xml" />
| <import resource="jbpm.identity.cfg.xml" />
|
| </jbpm-configuration>
hibernate.cfg.xml
<hibernate-configuration>
| <session-factory>
| <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
| <property name="hibernate.connection.driver_class">com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</property>
| <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmdb</property>
| <property name="hibernate.connection.username">root</property>
| <property name="hibernate.connection.password">root</property>
| <property name="hibernate.format_sql">true</property>
| <mapping resource="jbpm.repository.hbm.xml" />
| <mapping resource="jbpm.execution.hbm.xml" />
| <mapping resource="jbpm.history.hbm.xml" />
| <mapping resource="jbpm.task.hbm.xml" />
| <mapping resource="jbpm.identity.hbm.xml" />
| </session-factory>
| </hibernate-configuration>
i try to create task condidates like jbpm4 dec(6.1.1)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269180#4269180
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269180
16 years, 4 months
[jBPM Users] - Console: host not found error
by roger0681
Hi
I'm developing processes on JBPM 4.1 using JBoss 5.0.0.GA; everything runs fine, but when I want to access the console from outside the development net, I can only view the list of tasks. When I click "View", the frame doesn't show the .ftl file, but a "hots not found", or "host does not respond" notice.
If I check the properties of the frame source, I see that it is looking for
http://windowsServerName:8080/gwt-console-server/rs/form/task/2/render
when it should be
http://publicIP:public port/gwt-console-server/rs/form/task/2/render
|
As I thought it was JBoss using hard [windowsServerName], I changed the Connector Protocol in the file server.xml from
<Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"
to
<Connector protocol="HTTP/1.1" port="8080" address="[publicIP]"
but nothing changed.
My setup is:
Windows 2003 server running JBoss 5.0.0.GA, JBPM 4.1
JBoss listens to local port 8080
When I acces from Internet, I have the router translating public IP/public port to localIP:8080, and it works fine with jmx console, web console and even gwt console main menu - not ftl files frame.
Is this JBoss configuration problem, or gwt-console config problem? Did anybody have this issue?
Thanks,
Roger
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269146#4269146
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269146
16 years, 4 months
[jBPM Users] - Re: [jbpm 4.2] My first simple application doesn't work :(
by saraswati.santanu
You are missing jbpm.cfg.xml file in your classpath. A very simple jbpm.cfg.xml may look like this:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <jbpm-configuration>
|
| <import resource="jbpm.default.cfg.xml" />
| <import resource="jbpm.tx.hibernate.cfg.xml" />
| <import resource="jbpm.jpdl.cfg.xml" />
| <import resource="jbpm.identity.cfg.xml" />
|
| <!-- Job executor is excluded for running the example test cases. -->
| <!-- To enable timers and messages in production use, this should be included. -->
| <!--
| <import resource="jbpm.jobexecutor.cfg.xml" />
| -->
| </jbpm-configuration>
|
Create one such file in you classpath. That should make things progress further.
About the PVM documentation,the one they have there has examples using jbpm3.x. In 3.x there were those APIs. Jbpm4, I think, was not there when PVM docs were created. You should look at Jbpm dev-guide, user-guide and example with Jbpm4 instead.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269141#4269141
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269141
16 years, 4 months
[jBPM Users] - Re: [jbpm 4.2] My first simple application doesn't work :(
by -Silver-
Thanks!
I tried with your code but I received this exception:
| java.lang.ExceptionInInitializerError
| Caused by: org.jbpm.api.JbpmException:
| error: couldn't parse xml document : org.jbpm.api.JbpmException: resource jbpm.cfg.xml does not exist
| error: parsing exception: null : java.lang.NullPointerException
| at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:175)
| at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:141)
| at org.jbpm.pvm.internal.xml.Parse.checkErrors(Parse.java:190)
| at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.parse(ProcessEngineImpl.java:222)
| at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.setResource(ProcessEngineImpl.java:194)
| at org.jbpm.api.Configuration.setResource(Configuration.java:109)
| at org.jbpm.api.Configuration.getProcessEngine(Configuration.java:161)
| at prova.Main.<clinit>(Main.java:17)
| Caused by: org.jbpm.api.JbpmException
| at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:171)
| ... 7 more
| Caused by: java.lang.NullPointerException
| at org.jbpm.pvm.internal.util.XmlUtil.attribute(XmlUtil.java:289)
| at org.jbpm.pvm.internal.env.JbpmConfigurationParser.parseDocument(JbpmConfigurationParser.java:68)
| at org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:396)
| at org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:158)
| ... 5 more
| Exception in thread "main"
What could be the problem? Those are the two files of my project:
Main.java
import org.jbpm.api.Configuration;
| import org.jbpm.api.ExecutionService;
| import org.jbpm.api.ProcessDefinition;
| import org.jbpm.api.ProcessEngine;
| import org.jbpm.api.ProcessInstance;
| import org.jbpm.api.RepositoryService;
|
| public class Main{
| private static ProcessEngine processEngine;
|
| private static RepositoryService repositoryService;
| private static ExecutionService executionService;
|
| static {
| processEngine = Configuration.getProcessEngine();
|
| repositoryService = processEngine.get(RepositoryService.class);
| executionService = processEngine.getExecutionService();
| }
|
| /**
| * @param args
| */
| public static void main(String[] args) {
| //create new deployment object and ask it to deploy your flow
| String deploymentId = repositoryService.createDeployment().addResourceFromClasspath("sampleprocess.jpdl.xml").deploy();
|
| //now we query the process definition
| ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().deploymentId(deploymentId).uniqueResult();
|
| //start the process instance with the Id of the process definition
| ProcessInstance processInstance = executionService.startProcessInstanceById(processDefinition.getId());
| }
| }
|
and sampleprocess.jpdl
<?xml version="1.0" encoding="UTF-8"?>
|
| <process name="sampleprocess" xmlns="http://jbpm.org/4.0/jpdl">
| <start name="start1" g="238,73,48,48">
| <transition name="to end1" to="end1" g="-45,-20"/>
| </start>
| <end name="end1" g="267,271,48,48"/>
| </process>
Regarding to files that I described in my precedent post, I copied them directly from the PVM documentation, (Page 5 - 6 chapter 2). Could you send me the link to the correct PVM documentation?
Thanks!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269137#4269137
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269137
16 years, 4 months