[jBPM Users] - Re: How to stop a process instance
by fdegrigny
Last I found how to do this.
In fact the ProcessIntance.end() method really terminate the process but not all the running process tasks in it (this has confused me).
The process tasks have to be terminated separately.
At last, I have made all my ActionHandlers extends a custom base one :
public abstract class BaseActionHandler implements ActionHandler {
|
| public void execute(ExecutionContext executionContext) throws Exception {
| try {
| doAction(executionContext);
| } catch (Throwable t) {
| handleException(t, executionContext);
| }
| }
|
| public abstract void doAction(ExecutionContext executionContext) throws Exception;
|
| protected void handleException(Throwable t, ExecutionContext executionContext) throws Exception {
| log.fatal("Error in " + this.getClass().getName() + ": " + t.getMessage(), t);
|
| //try to stop process instance and associated tasks
| ProcessInstance processInstance = executionContext.getProcessInstance();
| stopProcess(processInstance);
|
| throw new JbpmException(t.getMessage(), t);
| }
|
| protected void stopProcess(ProcessInstance processInstance) {
| JbpmContext jbpmContext = JbpmConfiguration.getInstance().getCurrentJbpmContext();
| Collection<TaskInstance> taskInstances = unchekedCast(processInstance.getTaskMgmtInstance().getTaskInstances());
| for(TaskInstance task : taskInstances) {
| if( ! task.hasEnded() ) {
| task.setSignalling(false);
| task.cancel();
| jbpmContext.save(task);
| }
| }
| processInstance.end();
| }
| }
What I have found over-complicated is the JBPM API itself. I'm working with for few month now and there is many things I still cannot understand. For example, the various variables scopes are very confusing and the semantic of many operations are not very clear.
My customers have very basics needs for their workflows but I have discover that they cannot be done simply with the JBPM API.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259303#4259303
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259303
16 years, 6 months
[jBPM Users] - Re: Using JBPM for document workflow in a Java/Flex CMS soft
by mesa
@kukeltje i am not using alfresco because in view of my problem--- business process if completely different from Document workflow. in my case documents can or can not be part of workflow , i think alfresco supports documents workflow , process flow sits on top of jcr.
@noicangi , i think we both are working on the same problem set. i am using struts2,spring,mysql and jbpm3.3GA and tryint to integrate Jackrabbit with it.
my motivation comes down from the fact that document management solution is tested wih jackrabbit.
@noicangi i am planning to configure service within jbpm context , for example jcr service
and if i am able to get an handle and do all this then perform repository operation then there could be a way forward.
Other option is to use spring module , that is what i have done , but in this case keping a link between process flow and jcr node will come down to a manual db table mapping.
if anyone can suggest something else ..please do the needful
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259287#4259287
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259287
16 years, 6 months
[jBPM Users] - Re: JBPM4.1, JBoss 4.23 and Seam 2.2.0
by jjp
Hi drivexcite,
Seam 2.2 does not support pageflow with jBPM 4.1, but they are working together.
You can use jBPM 3 and 4 in parallel.
Your exception is because you replaced the jbpm-jpdl.jar, so Seam can not find jBPM3.
So leave this jar file, or disable jBPM for Seam in components.xml by removing
<bpm:jbpm />
I disabled jBPM3 in my application and the server is starting up,
I can use jBPM.
My problem is, that jBPM and Seam are using two different Hibernate sessions,
so I can not store my entities as jBPM variables (jBPM does not recognize my class as entity, so it serialises it as a blob).
I the first post I described my attempt to solve this. It's working,
but some transaction does not commit ... I think I have to take
the warning "Can not join ..." seriously.
In my further investigation I figured out, that jBPM is using
JTA Transactions and my Application uses CMT Transactions.
My knowledge about this is not that good.
I will have to do more analyses.
Best regards,
Joerg
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259281#4259281
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259281
16 years, 6 months
[jBPM Users] - JavaBinding
by theSourpuss
=== Environment ==============================
- jBPM Version : 4.1
- JDK : 1.6
- Spring 2.5 (use the SpringContext and SpringConfiguration file)
=== Problem description =========================
API doesn't work as expected. In JavaBinding for attribute 'class' the 'field' tag is processed as expected. If you use expression attributes (which is a spring bean) in java activities the 'field' tag is not set.
In custom activities it is set correctly. I don't know exactly, but I guess that in CustomBinding and JavaBinding ('class' attribute) the FieldOperation object is invoked correctly, but not invoked with JavaBinding 'expr' attribute.
Thanks for help.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259280#4259280
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259280
16 years, 6 months