]
Maciej Swiderski reassigned JBPM-2622:
--------------------------------------
Assignee: Maciej Swiderski (was: Tom Baeyens)
fix java static factory method use case
----------------------------------------
Key: JBPM-2622
URL:
https://jira.jboss.org/browse/JBPM-2622
Project: jBPM
Issue Type: Task
Security Level: Public(Everyone can see)
Reporter: Tom Baeyens
Assignee: Maciej Swiderski
Fix For: jBPM 4.x
this doesn't work as expected.
<process name="OrderWithRules">
<start>
<transition to="isImportant">
<java var="amount" class="java.lang.Integer"
method="parseInt">
<arg><object expr="#{amount}" /></arg>
</java>
</transition>
</start>
cause is to be found somewhere in JavaBinding, i think
if (XmlUtil.attribute(element, "method", true, parse, null)!=null) {
UserCodeReference invocationReference = parser.parseUserCodeReference(element,
parse);
javaActivity.setInvocationReference(invocationReference);
ObjectDescriptor objectDescriptor = (ObjectDescriptor)
invocationReference.getDescriptor();
javaActivity.setArgDescriptors(objectDescriptor.getArgDescriptors());
objectDescriptor.setArgDescriptors(null);
javaActivity.setMethodName(objectDescriptor.getMethodName());
objectDescriptor.setMethodName(null);
}
by setting the methodName to null in the object descriptor
(objectDescriptor.setMethodName(null)), the object descriptor will not see it as a static
factory method, but instead will look for the constructor of the class.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: