[JBoss JIRA] Created: (JBPM-1752) Expression Evaluation in ActionHandler Properties
by Alejandro Guizar (JIRA)
Expression Evaluation in ActionHandler Properties
-------------------------------------------------
Key: JBPM-1752
URL: https://jira.jboss.org/jira/browse/JBPM-1752
Project: JBoss jBPM
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Core Engine
Reporter: Alejandro Guizar
Assignee: Alejandro Guizar
Fix For: jBPM 3.3.0 GA
The parameters for an ActionHandler should be able to use expressions in it, so you could write
<action class="...">
<x>#{someObject.x}</x>
</action>
This could be done in the FieldInstatiator class (around line 67 we have "setPropertyValue(Class clazz, Object newInstance, String propertyName, Element propertyElement)"), but the execution context is not available there.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 5 months
[JBoss JIRA] Created: (JBPM-1701) in WireContext: bug when elements inside a list are referenced from outside the list.
by Guillaume Porcher (JIRA)
in WireContext: bug when elements inside a list are referenced from outside the list.
-------------------------------------------------------------------------------------
Key: JBPM-1701
URL: https://jira.jboss.org/jira/browse/JBPM-1701
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: PVM
Reporter: Guillaume Porcher
Priority: Critical
In this example:
public void testNamedElements() {
String contextText =
"<objects>" +
" <list name='l'>" +
" <object class='java.lang.Object' name='s'/>" +
" </list>" +
" <ref name='r' object='s' />" +
"</objects>";
WireContext wireContext = createWireContext(contextText);
assertNotNull(wireContext.get("s"));
assertNotNull(wireContext.get("l"));
assertNotNull(wireContext.get("r"));
assertSame(wireContext.get("s"), wireContext.get("r"));
wireContext = createWireContext(contextText);
assertNotNull(wireContext.get("r"));
assertNotNull(wireContext.get("l"));
assertNotNull(wireContext.get("s"));
assertSame(wireContext.get("s"), wireContext.get("r"));
}
the last assertion fails.
If the reference is accessed first, the object s is created when the reference is created, and then when the list is created.
If the list is created first, the reference uses the object in the list.
To fix this bug, I see 2 solutions:
- we can prevent the user from defining objects with names in lists.
- we can fix the creation of the list to check if some of the elements have already been created.
I think the first solution is better. If an element can be shared by more than one entity, it should be defined outside of all the entities and the entities should use ObjectReferences to access the shared element.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 6 months