[JBoss jBPM] - Ok, what am I missing?
by steveotto999
I'm trying to understand the jBPM system.
I've gone through the examples in the distro and I can successfully run all of them as JUnit tests. I did find one assertion failure BTW, where I had to change the number of tasks from 1 to 3. Small glitch, no biggie.
So here is my question: how do I step a workflow through a processdefinition that has a fork/join in it? I'm trying to step along using things like processInstance.signal()....but in the case of a fork, I will have multiple paths of execution yet there is only one RootToken. What do I do?
In a sense, I'm trying to simulate the workflow....and I saw somewhere in the FAQs that jBPM does NOT support simulation. This remark by Tom has me concerned -- it seems like I am trying to do something that I cannot do.
Thanks for any help,
Steve (lost in Oregon)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996736#3996736
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996736
17 years, 10 months
[JBoss jBPM] - Task Nodes into SuperState
by juangiovanolli
is possible put TaskNodes into SuperStates?
i'm getting this error when the processDefinition shown below is running in the jbpm-server
error
| type Exception report
|
| message
|
| description The server encountered an internal error () that prevented it from fulfilling this request.
|
| exception
|
| javax.servlet.ServletException: org.apache.jasper.JasperException
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
| org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
| org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
| org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
|
| root cause
|
| javax.faces.FacesException: org.apache.jasper.JasperException
| org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
| org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
| org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
| org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
| org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
| org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
|
| note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
|
processdefinition
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition xmlns="" name="SuperSt">
| <start-state name="start">
| <transition name="" to="super1/task1"></transition>
| </start-state>
|
| <super-state name="super1">
|
| <task-node name="task1">
| <task name="d" />
| <transition name="" to="../end1"></transition>
| </task-node>
| </super-state>
|
| <end-state name="end1"></end-state>
|
| </process-definition>
|
----------------------------------------------------------------------------------
thks and Merry Xmas from Argentina
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996730#3996730
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996730
17 years, 10 months
[EJB 3.0] - Stateful session with remote client problem
by jdware
Hi,
I'm using jboss-4.0.5.GA and jboss-EJB-3.0_RC9_Patch_1 and I'm getting an error when the client does the context lookup. My local interface works fine.
I'm getting a "java.lang.ClassNotFoundException: [Lorg.jboss.aop.advice.Interceptor". I found that class in jboss-aop-jdk50.jar and I know that it is in my classpath.
thanks in advance,
john
The source code is below the shell listing
main 1.0
main 1.1 context lookup using: JWStatefull/ShoppingCartBean/remote
Exception
javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1150)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at sfsb.Client.main(Client.java:17)
Caused by: java.lang.reflect.UndeclaredThrowableException
at $Proxy0.createProxy(Unknown Source)
at org.jboss.ejb3.JndiProxyFactory.getObjectInstance(JndiProxyFactory.java:52)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
... 4 more
Caused by: java.lang.ClassNotFoundException: [Lorg.jboss.aop.advice.Interceptor;
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:50)
at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:139)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:122)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
at org.jboss.remoting.Client.invoke(Client.java:525)
at org.jboss.remoting.Client.invoke(Client.java:488)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:48)
Here is the source code:
|
| /////////////////////////////////
| // Client.java
| package sfsb;
| import java.util.HashMap;
| import java.util.Properties;
| import javax.naming.InitialContext;
|
| public class Client
| {
| final static String jndiName = "JWStatefull/ShoppingCartBean/remote";
| public static void main(String[] args)
| {
|
| try{
| System.out.println( "main 1.0" );
| InitialContext ctx = new InitialContext();
| System.out.println( "main 1.1 context lookup using: " + jndiName );
| ctx.lookup( jndiName );
| Object obj = null;
| System.out.println( "main 1.2" );
| System.out.println( obj.toString() );
| ShoppingCart cart = (ShoppingCart) obj;
| System.out.println( "main 1.3" );
| }catch( Exception e ){
| System.out.println( "Exception " );
| e.printStackTrace();
| System.exit(-1);
|
| }
|
| }
| }
|
|
|
| /////////////////////////////////
| // ShoppingCart.java
|
|
|
| package sfsb;
|
| import java.util.HashMap;
| import javax.ejb.Remove;
|
| public interface ShoppingCart
| {
| void buy(String product, int quantity);
|
| HashMap<String, Integer> getCartContents();
|
| @Remove void checkout();
| }
|
|
| /////////////////////////////////////
| // ShoppingCartBean.java
|
| package sfsb;
|
| import java.io.Serializable;
| import java.util.HashMap;
| import javax.ejb.Remove;
| import javax.ejb.Stateful;
| import javax.ejb.Local;
| import javax.ejb.Remote;
|
| import org.jboss.annotation.ejb.LocalBinding;
| import org.jboss.annotation.ejb.RemoteBinding;
|
|
| @Remote
| @Local
| @LocalBinding ( jndiBinding="JWStatefull/ShoppingCart" )
| @Stateful
|
| public class ShoppingCartBean implements ShoppingCart, Serializable
| {
| private HashMap<String, Integer> cart = new HashMap<String, Integer>();
|
|
| public void buy(String product, int quantity)
| {
| if (cart.containsKey(product))
| {
| int currq = cart.get(product);
| currq += quantity;
| cart.put(product, currq);
| }
| else
| {
| cart.put(product, quantity);
| }
| }
|
| public HashMap<String, Integer> getCartContents()
| {
| return cart;
| }
|
| @Remove
| public void checkout()
| {
| System.out.println("To be implemented");
| }
| }
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996729#3996729
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996729
17 years, 10 months
[JBoss Seam] - Object level validation
by awhitford
I am creating JPA/EJB3 entity objects, and am using Hibernate Validation annotations for some basic constraints. And I definitely like how this validation framework is leveraged by Seam -- DRY!
But how can I best provide semantic object level validation? For example, imagine that I have a Bond class with several properties for creating the coupons:
| @Entity
| public class Bond
| {
| /** Primary key id */
| @Id
| @GeneratedValue
| private int id;
|
| @NotNull
| @Temporal(TemporalType.DATE)
| private Date issueDate;
|
| @Temporal(TemporalType.DATE)
| private Date datedDate;
|
| @Temporal(TemporalType.DATE)
| private Date firstCouponDate;
|
| @Temporal(TemporalType.DATE)
| private Date penultimateCouponDate;
|
| @Temporal(TemporalType.DATE)
| private Date maturityDate;
|
| @Column(columnDefinition = "tinyint")
| @Enumerated(EnumType.STRING)
| private CouponFrequency couponFrequency;
|
| @Column(length = 13)
| @Enumerated(EnumType.STRING)
| private AccrualMethod accrualMethod;
| }
|
I need the capability to validate the bond object to ensure the following:
| * issueDate < maturityDate
| * issueDate < firstCouponDate
| * issueDate < penultimateCouponDate
| * datedDate < firstCouponDate
| * datedDate < maturityDate
| * datedDate < penultimateCouponDate
| * firstCouponDate < penultimateCouponDate
| * firstCouponDate < maturityDate
| * penultimateCouponDate < maturityDate
|
And this is just the tip of the iceberg. (Note that there are seemingly redundant checks listed because most of the columns are nullable.)
What is the best practice for enforcing object level validation?
I'm looking for a strategy whereby a validation routine could be executed to create a list of invalid values, which them Seam could report to the user -- just like other Hibernate Validation annotation restrictions like @Min, @Max, @Range, etc.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996727#3996727
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996727
17 years, 10 months