Bug 1022833 - Fault stored in a BPM process is not always properly handled
Summary: Fault stored in a BPM process is not always properly handled
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: Rules / jBPM integration
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER1
: 6.3.0
Assignee: Aileen
QA Contact: Matej Melko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-24 06:54 UTC by Jiri Pechanec
Modified: 2025-02-10 03:28 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:28:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Reproducer (28.49 KB, application/zip)
2013-10-24 06:54 UTC, Jiri Pechanec
no flags Details

Description Jiri Pechanec 2013-10-24 06:54:08 UTC
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.

Comment 1 Jiri Pechanec 2013-10-24 06:54:43 UTC
Created attachment 815640 [details]
Reproducer

Comment 3 Anne-Louise Tangring 2014-06-19 18:42:28 UTC
This needs a corresponging BRMS issue for Rules/jBPM.

Comment 6 David Virgil 2015-08-03 12:23:04 UTC
It is working now. PR sent:

https://github.com/jboss-integration/fuse-bxms-integ/pull/96

Comment 10 Red Hat Bugzilla 2025-02-10 03:28:49 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


Note You need to log in before you can comment on or make changes to this bug.