[jBPM Users] - Re: Problem moving from 4.1 to 4.2 using Spring configuratio
by saraswati.santanu
Suganda,
It will be helpful if you can upload a sample jpdl you want to execute and a small code snippet that can deploy and start that flow.
It is difficult to conclude anything by looking at the stack trace. But the root of the exception suggests some missing tables.
| Factory method [public org.jbpm.api.ProcessEngine org.jbpm
| .pvm.internal.cfg.SpringConfiguration.buildProcessEngine()] threw exception; nested exception is org
| .jbpm.api.JbpmException: no jBPM DB schema: no JBPM4_EXECUTION table. Run the create.jbpm.schema t
| arget first in the install tool.
|
So make sure that the schema for JBPM is created properly.
As for spring-transaction-interceptor, I would say it is okay to use current=false. In fact I prefer not to set current=true. current=true expects a transaction to be present, while as current=false creates a transaction if it does not exists, and uses the existing one if already exists. In short current=true means propagation behaviour MANDATORY and current=false means propagation behaviour REQUIRED.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268619#4268619
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268619
16 years, 4 months
[jBPM Users] - Re: How to suspend Join Execution
by pradeep.gulla
Hi Santanu,
The code: taskService.deleteTask(task.getId()); throwing exception
tasks related to an execution must be completed. they cannot just be deleted
My Implementation:
Process XML:
| <process name="test_workflow" version="4" xmlns="http://jbpm.org/4.0/jpdl">
| <start g="15,390,80,40">
| <transition to="validate approval sequence"/>
| </start>
| <decision name="validate approval sequence" expr="${approvalSequence}">
| <transition name="parallel" to="assign parallel tasks"/>
| <transition name="seqential" to="first sequential Task"/>
| </decision>
| <fork name="assign parallel tasks">
| <transition to="first parallel task"/>
| <transition to="second parallel task"/>
| <transition to="third parallel task"/>
| </fork>
| <task name="first parallel task">
| <transition to="wait"/>
| <transition name="rework" to="disable all active tasks"/>
| </task>
| <task name="second parallel task">
| <transition to="wait"/>
| <transition name="rework" to="disable all active tasks"/>
| </task>
| <task name="third parallel task">
| <transition to="wait"/>
| <transition name="rework" to="disable all active tasks"/>
| </task>
| <join name="wait">
| <transition to="first sequential task"/>
| </join>
| <task name="first sequential Task">
| <transition name="approve" to="second sequential Task"/>
| </task>
| <task name="second sequential Task">
| <transition name="approve" to="stop"/>
| </task>
| <!-- Should disable all active parallel tasks -->
| <custom name="disable all active tasks" class="ReworkHandler">
| <transition to="rework task"/>
| </custom>
| <task name="rework task">
| <transition name="restart" to="validate approval sequence"/>
| </task>
| <end name="stop"/>
|
Handler class:
| public class ReworkHandler implements ExternalActivityBehaviour{
| public void execute(ActivityExecution execution) {
| ..................
| taskService.deleteTask(task.getId());
| }
| }
Am I' missing anything ??
.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268608#4268608
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268608
16 years, 4 months
[jBPM Users] - Re: Variable missing in assignment handler
by nizzy
"Implicit is possible by extending and overriding the subprocess node implementation."
--
Why are super-process variables not by default copied into the sub-process?
Am I missing something or is this not the behaviour what most people require, should it not be included as part of Jboss JBPM core functionality?
It may just be the way we use JBPM but I always want the super-process variables to be available to the sub-process, without having to worry about overriding SubprocessNode implementation!
Indeed it is counter-intuitive that they are not available.
Defining them in the process definition is IMO not the best way to achieve this; since a dependecny is introduced between the business logic layer and the process definition xml.
I assume there is a very good reason for this limitation?
Could someone enlighten me please!!!!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268592#4268592
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268592
16 years, 4 months
[jBPM Users] - Re: Variables keep old values
by aroeder
I wrote a JUnit test for showing my problem:
| package de.firstdata.test;
|
| import java.io.IOException;
| import java.util.HashMap;
| import java.util.Map;
| import java.util.Set;
|
| import org.jbpm.graph.def.ProcessDefinition;
| import org.jbpm.graph.exe.ProcessInstance;
| import org.jbpm.taskmgmt.exe.TaskInstance;
|
| import de.firstdata.config.TicketServiceConfigService;
| import de.firstdata.dm.JBPMContextWrapper;
| import de.firstdata.dm.TicketSystemDomainModelFacade;
|
| public class JbpmVariablesTest extends ATicketServiceTestA {
|
| private TicketSystemDomainModelFacade facade = null;
|
| @SuppressWarnings("unchecked")
| public void testVariables() throws IOException {
|
| JBPMContextWrapper ctx = getContextWrapper();
|
| try {
| ProcessDefinition processDefinition = ProcessDefinition
| .parseXmlString("<process-definition xmlns='' name='ABR'>" + "<start-state name='start-state1'>"
| + "<transition to='edit'></transition>" + "</start-state>" + "<task-node name='edit'>"
| + "<task name='edit'>" + " <controller>"
| + " <variable access='read,write,required' name='inbox'></variable>" + " </controller>"
| + "</task>" + "<transition to='change' name='tochange'></transition>"
| + "<transition to='end-state1' name='done'></transition>" + "</task-node>"
| + "<task-node name='change'>" + "<task name='indexDataChange'>" + " <controller>"
| + " <variable access='read,write,required' name='inbox'></variable>" + " </controller>"
| + "</task>" + "<transition to='edit' name='back'></transition>" + "</task-node>"
| + "<end-state name='end-state1'></end-state>" + "</process-definition>");
|
| Map<String, String> myMap = new HashMap<String, String>();
| myMap.put("inbox", "COMPLAINTS_MANAGEMENT");
|
| ctx.deployProcessDefinition(processDefinition);
| ProcessInstance processInstance = processDefinition.createProcessInstance(myMap);
| ctx.save(processInstance);
| processInstance.signal();
|
| TaskInstance taskEdit = getTaskInstance(processInstance, "edit");
| taskEdit.end("tochange");
|
| ctx.save(taskEdit);
|
| TaskInstance taskChange = getTaskInstance(processInstance, "indexDataChange");
| Map<String, String> variables = taskChange.getContextInstance().getVariables();
| variables.put("inbox", "CS_ISO");
| taskChange.getProcessInstance().getContextInstance().addVariables(variables);
| ctx.save(taskChange);
| ctx.close();
| ctx = getContextWrapper();
|
| taskChange.end("back");
|
| taskEdit = getTaskInstance(processInstance, "edit");
| Map<String, String> changedVariables = taskEdit.getProcessInstance().getContextInstance().getVariables();
|
| String inbox = (String) changedVariables.get("inbox");
|
| taskEdit.end("done");
| processInstance.end();
| ctx.deleteProcessDefinition(processDefinition);
|
| assertEquals("CS_ISO", inbox);
| } finally {
| ctx.close();
| }
| }
|
| private JBPMContextWrapper getContextWrapper() {
| if (facade == null) {
| facade = (TicketSystemDomainModelFacade) TicketServiceConfigService.getConfig().getFacade();
| }
| return JBPMContextWrapper.getInstance("jbpm.cfg.xml", facade);
| }
|
| @SuppressWarnings("unchecked")
| private TaskInstance getTaskInstance(final ProcessInstance processInstance, final String taskInstanceName) {
| TaskInstance returnInstance = null;
| Set<TaskInstance> tasks = (Set<TaskInstance>) processInstance.getTaskMgmtInstance().getTaskInstances();
|
| for (TaskInstance ti : tasks) {
| if (ti.getName().equals(taskInstanceName) && !ti.hasEnded()) {
| returnInstance = ti;
| }
| }
|
| return returnInstance;
| }
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268545#4268545
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268545
16 years, 4 months
[jBPM Users] - Re: How signal as a state to a task?
by cmjhingeniero
Sorry, I think it made me understand. I do not speak English
I have the notify method, and I want to enforce the transition "send email", when the response variable equals "N"
As I pass the signal to the next task???........... when he comes to the response variable "N", run the following task
| public void notify(EventListenerExecution execution) throws Exception {
| String response = execution.getVariable("response")+"";
| if (response.equals(null)) {
| response = new String();
| execution.setVariable("response", response);
| }
| ReposicionDao reposicion = new ReposicionDao();
| response = reposicion.verificarCarguePorReposicion(documento, caf);
| execution.setVariable("response", response);
| if(execution.getVariable("response").toString().equals("N")){
|
| ..................
| //SHOULD I PUT THAT CODE
|
| }
| }
|
Thanks, excuse for my English
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268532#4268532
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268532
16 years, 4 months