[jBPM Users] - [jbpm 4.2] My first simple application doesn't work :(
by -Silver-
I'm trying to develop my first workflow with jbpm 4.2 and netbeans but it doesn't works.
I created a new project called "displayproject" and imported as libraries the file jbpm.jar that is in the root jbpm's folder and all the files that are in the "lib" folder.
The project contains only those two files:
Display.java
| package displayproject;
|
| import java.util.List;
| import java.util.Map;
| import java.util.Set;
| import org.jbpm.api.Execution;
| import org.jbpm.pvm.internal.model.Activity;
| import org.jbpm.pvm.internal.model.ObservableElement;
| import org.jbpm.pvm.internal.model.OpenProcessDefinition;
| import org.jbpm.pvm.internal.model.Transition;
|
| public class Display implements Activity{
| String message;
|
| public Display(String message){
| this.message=message;
| }
|
| public void execute(Execution execution){
| System.out.println(message);
| }
| }
|
Main.java
| package displayproject;
|
| import org.jbpm.api.Execution;
| import org.jbpm.api.ProcessDefinition;
|
| public class Main{
|
| public static void main(String[] args) {
| ProcessDefinition processDefinition = ProcessFactory.build().node("a")
| .initial.behaviour(new Display("hello")).transition().to("b")
| .node("b").behaviour(new Display("world")).done();
| Execution execution = processDefinition.startExecution();
| }
| }
|
in Main.java netbeans tell me that it's unable to find the object ProcessFactory and the method startExecution() .
What'is wrong?
What libraries have I to import in a process project? In what folder of jbpm4.2 could I find them?
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268885#4268885
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268885
16 years, 4 months
[jBPM Users] - Problem to run jBPM under jBoss and searching for PVM docume
by -Silver-
Hi all and nice to meet you!
I'm new here but I think that I'll write many many posts!
I started work of my master thesis based on jBPM so I hope to find support here :) !
To start I've two questions:
1) I installed manually jBPM version 4.2 on jBoss 5.1.0GA then I went to folder "C:\jboss-5.1.0GA\bin\" and typed "run -c jbpm". I received the follow error message:
Calling C:\jboss-5.1.0.GA\bin\run.conf.bat
| ===============================================================================
|
| JBoss Bootstrap Environment
|
| JBOSS_HOME: C:\jboss-5.1.0.GA
|
| JAVA: c:\program files (x86)\java\JDK1.6.0_17\bin\java
|
| JAVA_OPTS: -Dprogram.name=run.bat -Xms128M -Xmx512M -XX:MaxPermSize=256M -Dsun
| .rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg
| .jboss.resolver.warning=true -server
|
| CLASSPATH: C:\jboss-5.1.0.GA\bin\run.jar
|
| ===============================================================================
|
| 20:58:52,953 INFO [ServerImpl] Starting JBoss (Microcontainer)...
| 20:58:52,956 INFO [ServerImpl] Release ID: JBoss [The Oracle] 5.1.0.GA (build:
| SVNTag=JBoss_5_1_0_GA date=200905221634)
| 20:58:52,957 INFO [ServerImpl] Bootstrap URL: null
| 20:58:52,959 INFO [ServerImpl] Home Dir: C:\jboss-5.1.0.GA
| 20:58:52,960 INFO [ServerImpl] Home URL: file:/C:/jboss-5.1.0.GA/
| 20:58:52,961 INFO [ServerImpl] Library URL: file:/C:/jboss-5.1.0.GA/lib/
| 20:58:52,962 INFO [ServerImpl] Patch URL: null
| 20:58:52,963 INFO [ServerImpl] Common Base URL: file:/C:/jboss-5.1.0.GA/common/
|
| 20:58:52,964 INFO [ServerImpl] Common Library URL: file:/C:/jboss-5.1.0.GA/comm
| on/lib/
| 20:58:52,965 INFO [ServerImpl] Server Name: jbpm
| 20:58:53,019 INFO [ServerImpl] Server Base Dir: C:\jboss-5.1.0.GA\server
| 20:58:53,020 INFO [ServerImpl] Server Base URL: file:/C:/jboss-5.1.0.GA/server/
|
| 20:58:53,022 INFO [ServerImpl] Server Config URL: file:/C:/jboss-5.1.0.GA/serve
| r/jbpm/conf/
| 20:58:53,023 INFO [ServerImpl] Server Home Dir: C:\jboss-5.1.0.GA\server\jbpm
| 20:58:53,024 INFO [ServerImpl] Server Home URL: file:/C:/jboss-5.1.0.GA/server/
| jbpm/
| 20:58:53,026 INFO [ServerImpl] Server Data Dir: C:\jboss-5.1.0.GA\server\jbpm\d
| ata
| 20:58:53,027 INFO [ServerImpl] Server Library URL: file:/C:/jboss-5.1.0.GA/serv
| er/jbpm/lib/
| 20:58:53,032 INFO [ServerImpl] Server Log Dir: C:\jboss-5.1.0.GA\server\jbpm\lo
| g
| 20:58:53,033 INFO [ServerImpl] Server Native Dir: C:\jboss-5.1.0.GA\server\jbpm
| \tmp\native
| 20:58:53,089 INFO [ServerImpl] Server Temp Dir: C:\jboss-5.1.0.GA\server\jbpm\t
| mp
| 20:58:53,091 INFO [ServerImpl] Server Temp Deploy Dir: C:\jboss-5.1.0.GA\server
| \jbpm\tmp\deploy
| 20:58:54,137 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/j
| boss-5.1.0.GA/server/jbpm/conf/bootstrap.xml
| Failed to boot JBoss:
| java.lang.RuntimeException: Error unmarshalling file:/C:/jboss-5.1.0.GA/server/j
| bpm/conf/bootstrap.xml
| at org.jboss.bootstrap.xml.BootstrapParser.parse(BootstrapParser.java:60
| )
| at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java
| :123)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:
| 450)
| at org.jboss.Main.boot(Main.java:221)
| at org.jboss.Main$1.run(Main.java:556)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/
| C:/jboss-5.1.0.GA/server/jbpm/conf/bootstrap.xml
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBPars
| er.java:177)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java
| :119)
| at org.jboss.bootstrap.xml.BootstrapParser.parse(BootstrapParser.java:53
| )
| ... 5 more
| Caused by: java.io.FileNotFoundException: C:\jboss-5.1.0.GA\server\jbpm\conf\boo
| tstrap.xml
| at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnecti
| on.java:105)
| at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLC
| onnection.java:112)
| at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown So
| urce)
| at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown
| Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
| at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
| at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour
| ce)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBPars
| er.java:173)
| ... 7 more
| 20:58:54,314 INFO [ServerImpl] Runtime shutdown hook called, forceHalt: true
| 20:58:54,343 INFO [ServerImpl] Shutdown complete
| Shutdown complete
| Halting VM
| Press a key to continue . . .
|
I know that I probably have a problem with my java path (I'm running java 32 under windows 7 64bit and something is wrong with path) could be this the problem?
2)Where could I find detailed PVM developer's documentation?
Thanks a lot!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268864#4268864
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268864
16 years, 4 months
[jBPM Users] - Re: [jbpm 4.2] Finding a Process Instance
by mike_burton
Hi Santanu
Thanks for your respnse.
When i use this statement in my code, i am getting the below exception.
org.jbpm.api.JbpmException: no environment to get org.hibernate.Session
at org.jbpm.pvm.internal.env.Environment.getFromCurrent(Environment.java:196)
at org.jbpm.pvm.internal.env.Environment.getFromCurrent(Environment.java:189)
at org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:63)
at org.jbpm.pvm.internal.query.AbstractQuery.untypedUniqueResult(AbstractQuery.java:68)
at org.jbpm.pvm.internal.query.ProcessInstanceQueryImpl.uniqueResult(ProcessInstanceQueryImpl.java:43)
at com.kenexa.core.workflow.CoreWorkflowExecutionService.getCurrentActiveStepName(CoreWorkflowExecutionService.java:228)
at com.kenexa.core.workflow.CoreWorkflowExecutionService.initiateWorkflow(CoreWorkflowExecutionService.java:71)
at com.kenexa.perform.web.actions.goals.ManageGoalActionImpl.save(ManageGoalActionImpl.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
Then changed the statment from
ProcessInstanceQuery query = new ProcessInstanceQueryImpl(); to
ProcessInstanceQueryImpl lProcessInstanceQuery = (ProcessInstanceQueryImpl) WorkflowUtil.getExecutionService().createProcessInstanceQuery();
I am not sure, is it the correct way of getting ProcessInstanceQuery?
Also once the ProcessInstance is started, i want to get the current activity name from process instance. Is there any method avaialble in ProcessInstance?
Please suggest me.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268859#4268859
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268859
16 years, 4 months