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