[jbpm-issues] [JBoss JIRA] Updated: (JBPM-2622) fix java static factory method use case

Tom Baeyens (JIRA) jira-events at lists.jboss.org
Tue Jan 5 05:12:30 EST 2010


     [ https://jira.jboss.org/jira/browse/JBPM-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Baeyens updated JBPM-2622:
------------------------------

    Fix Version/s: jBPM 4.x
                       (was: jBPM 4.4)


> fix java static factory method use  case
> ----------------------------------------
>
>                 Key: JBPM-2622
>                 URL: https://jira.jboss.org/jira/browse/JBPM-2622
>             Project: jBPM
>          Issue Type: Task
>      Security Level: Public(Everyone can see) 
>            Reporter: Tom Baeyens
>            Assignee: Tom Baeyens
>             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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbpm-issues mailing list