[JBoss jBPM] - Help needed in deploying 'par' to JBoss server
by vignesh57
Hi folks, i am new to jBPM. I use to deploy projects using the deployment tab in eclicpse IDE. I now want to deploy it using java code.
I tried the following piece of code. No exceptions & errors. But the file is not deployed. Please help me in completing this.
| JbpmContext ctx = JbpmConfiguration.getInstance().createJbpmContext();
| try {
| FileInputStream fis = new FileInputStream("c:\\test.par");
|
| ZipInputStream is = new ZipInputStream(fis);
|
| ProcessDefinition pd = ProcessDefinition.parseParZipInputStream(is);
|
| ctx.deployProcessDefinition(pd);
|
| ctx.getGraphSession().saveProcessDefinition(pd);
|
| System.out.println("Deployment Successfull");
| }
| catch(Exception e)
| {
| System.out.println(e.toString());
| }
| finally {
| ctx.close();
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240348#4240348
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240348
16 years, 10 months
[JBoss jBPM] - Re: Indentityservice - Jbpm4
by nilspreusker
Hi all,
I've tried to register a custom IdentitySessionImpl the way it is described in chapter 9 of the user guide (implementing org.jbpm.session.IdentitySession - which has been moved to org.jbpm.pvm.internal.identity.spi.IdentitySession - and configuring it in the trasnaction-context of the jBPM configuration as <object class="your.package.YourIdentitySession" />). However it looks as though the configuration is ignored and the internal implementation of the identity session (org.jbpm.pvm.internal.identity.impl.IdentitySessionImpl) is always used. A quick look at the source code suggests that the IdentitySessionBinding contains a hard-coded reference to org.jbpm.pvm.internal.identity.impl.IdentitySessionImpl, which explains this behavior. Now I've heard that some restructuring of the identity component is on its way, so my question is whether there is a way to get this to work at the moment. (I'm working with the jBPM4 trunk at revision 5066.)
Cheers, Nils
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240237#4240237
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240237
16 years, 10 months
[JBoss jBPM] - Re: Best way to get audit or history information
by swatis
to get list of process instances for particular process provide processdefinition id
Query query = session.getNamedQuery("GraphSession.findAllProcessInstancesForADefinition");
| query.setLong("processDefinitionId", processDefinitionId);
| java.util.List processInstances = query.list();
Iterate these instances and for one instance get list of task instances by invoking method of process instance object
java.util.List taskList = processInstance.getTaskMgmtInstance().getTaskInstances();
you can also use this query to get list of all process definitions
Query query = session.getNamedQuery("GraphSession.findAllProcessDefinitions");
to get list of all process instances
Query query = session.getNamedQuery("GraphSession.findAllProcessInstances
| ");
For each task instance use
taskIns.getActorId(); taskIns.getStart(); taskIns.getEnd();
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240201#4240201
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240201
16 years, 10 months
[JBoss jBPM] - Error while completing task
by rams.rapol
Hi,
Following error is thrown when last task in a process is completed.
This happens only for the last task before the process is ended and not for intermediate tasks.
Also, should i explicitly set the value of result in variables? something like this? I'm assuming this to be only in case of sub process and is not needed even if task has multiple transitions?
taskService.setVariable(taskImpl.getDbid(), "result", action);
Code & Process Definition:
| taskService.completeTask(taskImpl.getDbid());
|
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process name="SimpleProcess" xmlns="http://jbpm.org/4.0/jpdl">
|
| <start g="20,20,48,48">
| <transition to="review1" />
| </start>
|
| <task name="review1" g="96,16,127,52">
| <assignment-handler class="com.test.tasks.TaskHandler">
| </assignment-handler>
| <transition to="review2" />
| </task>
|
| <task name="review2" g="96,16,127,52">
| <assignment-handler class="com.test.tasks.TaskHandler">
| </assignment-handler>
| <transition to="endstate" />
| </task>
|
| <end name="endstate" g="255,16,88,52" />
|
| </process>
|
|
| java.lang.NullPointerException
| at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:47)
| at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:31)
| at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
| at org.jbpm.pvm.internal.spring.CommandTransactionCallback.doInTransaction(CommandTransactionCallback.java:50)
| at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
| at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:76)
| at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
| at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
|
|
|
|
Thanks,
-Rams
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240135#4240135
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240135
16 years, 10 months