[jboss-user] [jBPM] - How can a Service Task take integer variable via additional parameters?

Bruce Cui do-not-reply at jboss.com
Sat Jun 25 03:14:25 EDT 2011


Bruce Cui [http://community.jboss.org/people/brucecui] created the discussion

"How can a Service Task take integer variable via additional parameters?"

To view the discussion, visit: http://community.jboss.org/message/611945#611945

--------------------------------------------------------------
Here is the thing. I'm trying to test a self-defined service task. I have referred to the Chapter 13 in the user guide, and also the "JBPM5 Example - Human Task Forms with Variables - WorkItems" example. They worked fine.

But I met problem when I tried to add an integer parameter in the task. Here are the things I have done:
1. Defined a process with 4 String variables, and 1 Integer varible. Say aStr, bStr, cStr, dStr, and aInt.
2. Defined a process form which is taking 4 String params. And aStr takes an integer value.
3. Put a script task right after the start point. Parse aStr to aInt.
4. Create a MyWorkDefinitions.wid file with the definition of my service task. 3 StringDataType, and 1 IntegerDataType parameters. Packs imported.
5. Create a drools.rulebase.conf with MyWorkDefinitions.wid and WorkDefinitions.conf defined. (Here in the user guide there is a mistake).

Until here, all things went fine. I can see the service task in a new editor window, and can see the parameters when I put one in the canvas. But the problem happened when I assign the variables to the parameters for the Integer one.

I used format #{bStr} for the three String ones, they got accepted. But when I assigned #{aInt} to the Integer param, I got an error window.

Here is a full message in the error log: (+mxtInt+ is the actual variable name in my local file)
 http://community.jboss.org/servlet/JiveServlet/showImage/2-611945-16583/2011-06-25_150959.jpg  http://community.jboss.org/servlet/JiveServlet/downloadImage/2-611945-16583/450-496/2011-06-25_150959.jpg 

I'm new to both JBPM or Drools. I'm not sure whether I'm using this right. Please help me out here.

Also I would like to know if there are any examples with output back to the process.

Thanks in advace.
--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110625/990f76e7/attachment-0001.html 


More information about the jboss-user mailing list