The use case in question is having a service that is called from BPM which throws an exception (fault). This fault is stored in 'fault' process variable. It is expected that at the end of the process when this variable is not null then the process generates fault. The problem is that in some cases this does not work - see reproducer. If you deploy the reproducer and send fail message - then the BPM service properly generates fault - see in log 08:41:20,835 INFO [stdout] (Camel (camel-4) thread #5 - file:///home/jpechane/in) ############### Call result java.lang.reflect.UndeclaredThrowableException But if you redeploy the application and send -ok message you will see 06:58:49,823 INFO [stdout] (Camel (camel-12) thread #13 - file:///home/jpechane/in) ############### Call result OrderAck [order=SimpleOrder [id=1, name=Sample Order 1, items=[OrderItem [sku=1, count=1, pricePerUnit=101.1], OrderItem [sku=11, count=2, pricePerUnit=202.2], OrderItem [sku=12, count=3, pricePerUnit=303.3], OrderItem [sku=13, count=4, pricePerUnit=404.4]], totalPrice=3032.999999999999914734871708787977695465087890625], accepted=true] which is ok and then if you send the fault message then you will see in the log 08:41:00,850 INFO [stdout] (Camel (camel-3) thread #2 - file:///home/jpechane/in) ############### Call result null I made some further investigation - the fault variable is properly filled but when MVEL expression is executed that extracts the variable contents it returns null instead of the fault. Upon further investigation I found that in some cases the MVEL expression when compile will generate org.mvel2.optimizers.impl.refl.nodes.MapAccessor to get the value of the fault which works, but in another case generates org.mvel2.optimizers.impl.refl.nodes.VariableAccessor and this returns null even if variable contains something.
Created attachment 815640 [details] Reproducer
This needs a corresponging BRMS issue for Rules/jBPM.
It is working now. PR sent: https://github.com/jboss-integration/fuse-bxms-integ/pull/96
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.