[jboss-jira] [JBoss JIRA] Closed: (JBPM-924) Allow "raw" String in FieldInstantiator

Tom Baeyens (JIRA) jira-events at lists.jboss.org
Thu Apr 19 06:00:30 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBPM-924?page=all ]

Tom Baeyens closed JBPM-924.
----------------------------

    Resolution: Won't Fix

too hard to fix that in the current wiring.  especially since what you try to achieve is an edge-case.

the next generation wiring that we've implemented for 4.0 will support your requirements.

> Allow "raw" String in FieldInstantiator 
> ----------------------------------------
>
>                 Key: JBPM-924
>                 URL: http://jira.jboss.com/jira/browse/JBPM-924
>             Project: JBoss jBPM
>          Issue Type: Feature Request
>          Components: BPEL
>    Affects Versions: jBPM GPD 3.0.8
>            Reporter: andrew cooke
>         Assigned To: Tom Baeyens
>
> Hi,
> General problem: we have an action that takes as a parameter a value of type Object (it's a message payload, and so really can be any Object  - for in-memory transport it doesn't even need to be serializable).  When we specify the action parameter as a String we get an exception from FieldInstantiator because the "intelligent" logic checks the argument type and tries to call (reasonably enough) the constructor Object(String).  This constructor doesn't exist and so we get a failure.
> In case that wasn't clear, the XML is:
> <process-definition>
>   ....
>     <action class="OurClass">
>       <ourParam>string value</ourParam>
>     </action>
>   ....
> </process-definition>
> Now this would work if the String "string value" was simply passed to OurClass.setOurParam(Object), which is what you might expect, looking at the config file.
> Specific fix: What I would suggest to fix this is a small extension to the logic in FieldInstantiator.getValue which checks to see whether the constructor (line 145) exists and, if not, checks whether the target type is a superclass of String.  If it is (ie Object) then it should return the String (which is a valid Object).
> Does that make sense?  Thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list