whabelitz [https://community.jboss.org/people/whabelitz] created the discussion

"jBPM Eclipse modeler: How to enter a numerical value to a service node input 
parameter"

To view the discussion, visit: https://community.jboss.org/message/726870#726870

--------------------------------------------------------------
I #####use jBPM 5.0 and want to apply domain-specific service nodes with 
parameters of type Integer.
So I define for the Eclipse process modeler something like
 [
     "name" : "TestNode",
     "parameters" : [
         "stringPara": new StringDataType(),
         "intPara" : new IntegerDataType(),
     ],
     "results" : [
         "intResult" : new IntegerDataType(),
     ],
     "displayName" : "Test activity",
     "icon" : "icons/action.gif"
 ]
in my WorkDefinitions.conf file.

How can I now enter integer values inside the process modeler when using such a 
service node?
If I just enter a numerical value inside the property pane, I get an error 
(ClassCastException: java.lang.String cannot be cast to java.lang.Integer) 
after saving and reopening the process definition. The expression inside the 
process definition looks like
      <dataInputAssociation>
        <targetRef>_2_intParaInput</targetRef>
        <assignment>
          <from xsi:type="tFormalExpression">1</from>
          <to xsi:type="tFormalExpression">_2_intParaInput</to>
        </assignment>
      </dataInputAssociation>

If no solution for Eclipse is available, can the web modeler (Oryx Designer) 
handle numerical parameters?  And can the web modeler be used standalone 
(without Guvnor) reading and writing process definitions from/to the file 
system?

If I manage to handle numerical values during process design, what is during 
runtime? Can I access this parameter inside a WorkItemHandler using "(Integer) 
workItem.getParameter("intPara")" or will this cause a class cast exception?

My work around at the moment is defining non string values inside a script node 
and using parameter mapping, but this is not a nice solution and inflate the 
process definition
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/726870#726870]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to