[jBPM] New message: "Re: How to handle rollback due to runtime errors"
by Ronald van Kuijk
User development,
A new message was posted in the thread "How to handle rollback due to runtime errors":
http://community.jboss.org/message/528039#528039
Author : Ronald van Kuijk
Profile : http://community.jboss.org/people/kukeltje
Message:
--------------------------------------------------------------
Yes there has been ideas in this area... In fact jBPM 2.0 had some functionality for 'compensating' actions. It was not in the next release since it was way to difficult to fully support all kinds of compensations and have the right information available. E.g. the jBPM task that was to be rolled back should have the 'previous' data, but if, like you say, e.g. the relevant DB is not available, how can that be accessed?And this is just one of a multitude of problems.
That is specifically the reason I would not, (really *not*) use plain webservices in enterprise grade systems other than simply querying e.g. a usermanagement system. All other kinds of access to external/different systems should either go through transaction aware protocols or should be capable to receive the same data twice if e.g. the activity is executed again.
All these things are 'good habits' in designing systems and one of the reasons webservices did not really take off (have you seen a webservice library that could participate in a JTA transaction? (e.g. as a JCA module) And if you have, could the receiving party handle ws-transactions?
So your question is a valid and understandable one, but the solution is not within jBPM but e.g. http://jboss.org/jbosstm (but that is JBoss specific)
Cheers,
Ronald
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528039#528039
16 years, 2 months
[JBoss AOP] New message: "Field annotation"
by MK Song
User development,
A new message was posted in the thread "Field annotation":
http://community.jboss.org/message/528037#528037
Author : MK Song
Profile : http://community.jboss.org/people/mksong
Message:
--------------------------------------------------------------
Hello,
I don't know why #2 and #3 do not work in the following example.
Please, help me out.
(1) works well
<bind pointcut="field(* bank.BankAccount->*)">
(2) does not work.
<bind pointcut="field((a)bank.SecurityFieldAnnotation bank.BankAccount->*)">
(3) does not work.
<bind pointcut="field(* bank.BankAccount->@bank.SecurityFieldAnnotation)">
----------------------------------------------------------------------------
package bank;
import bank.SecurityFieldAnnotation;
public class BankAccount
{
@SecurityFieldAnnotation
private int counter;
public int getCounter() { return counter; }
public void setCounter(int counter) { this.counter = counter;}
}
----------------------------------------------------------------------------
package bank;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
@Target({ElementType.FIELD})
public @interface SecurityFieldAnnotation {
}
----------------------------------------------------------------------------
package bank;
import org.jboss.aop.joinpoint.*;
public class SecurityFieldAspect
{
public Object access(FieldReadInvocation invocation)
throws Throwable {
System.out.println("[DBG] access read");
return invocation.invokeNext();
}
public Object access(FieldWriteInvocation invocation)
throws Throwable {
System.out.println("[DBG] access write");
return invocation.invokeNext();
}
}
----------------------------------------------------------------------------
<aop>
<aspect class="bank.SecurityFieldAspect"
scope="PER_JOINPOINT"/>
<bind pointcut="field(* bank.BankAccount->@bank.SecurityFieldAnnotation)">
<advice name="access"
aspect="bank.SecurityFieldAspect"/>
</bind>
</aop>
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528037#528037
16 years, 2 months
[jBPM] New message: "Re: [jBPM4.1] - No Environment Exception"
by Mike Burton
User development,
A new message was posted in the thread "[jBPM4.1] - No Environment Exception":
http://community.jboss.org/message/528035#528035
Author : Mike Burton
Profile : http://community.jboss.org/people/mike_burton
Message:
--------------------------------------------------------------
Hi Ronald,
Thanks for your reply and also sorry for the confusion.
This is what i am trying to to.
Using Query API and process instance id i am getting ProcessInstance in my code.
After getting the ProcessInstance, using ExecutionImpl i am trying to get the Outgoing Transitions for a state in a workflow.
ProcessInstance processInstance = getExecutionService().createProcessInstanceQuery().processInstanceId(pProcessInstanceID).uniqueResult();
ExecutionImpl activeExecution = ((ExecutionImpl)processInstance).findActiveExecutionIn(StateName);
List<Transition> outgoingTransitionList = activeExecution.getActivity().getOutgoingTransitions();
With this code i am getting 'No Environment Exception'. Did i miss something over here?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528035#528035
16 years, 2 months
[jBPM] New message: "[jBPM4.1] - No Environment Exception"
by Mike Burton
User development,
A new message was posted in the thread "[jBPM4.1] - No Environment Exception":
http://community.jboss.org/message/528016#528016
Author : Mike Burton
Profile : http://community.jboss.org/people/mike_burton
Message:
--------------------------------------------------------------
Hi
Can anyone please guide me how to fix this. When i am trying to get the outgoing transitions from an activity/state i end up with below exception.
Can anyone please suggest me why i am getting this exception and how to fix this.
org.jbpm.api.JbpmException: no environment to get org.jbpm.pvm.internal.session.RepositorySession
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.model.ExecutionImpl.getProcessDefinition(ExecutionImpl.java:1096)
at org.jbpm.pvm.internal.model.ExecutionImpl.getActivity(ExecutionImpl.java:1118)
Thanks for your valuable reply
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528016#528016
16 years, 2 months