The issue seems to be your assignment mapping of the task data outputs. Please note the "To" and "From" columns in the data assignments editor:
** When you are mapping DATA INPUTS:
"From" columns should have the object you are mapping from, so like process variables, globals, etc
"To" columns should have the object you are mapping to, so the data input of your task

** When you are mapping DATA OUTPUTS:
"From" columns should have the object you are mapping from, so your data output of your Task
"To" columns should have the object you are mapping to, so like your process variables, globals, etc.

I think in your case you should just switch your assignments for your task data outputs, so:
** Task 1:
from Object="Approve" is mapped to "ApprovedRequest"
should be
from Object="ApprovedRequest" is mapped to "Approve"

** Task 2:
from Object="Order" is mapped to "OrderItem"
should be
from Object="OrderItem" is mapped to "Order"

Hope this helps.
Tihomir
On 8/7/12 10:06 AM, Saadi Ajam wrote:
Thanks a lot for reply,
Actually I was searching the internet and I found your post in wordpress. And yes it was a variable or binding error. I removed all the variables and the forms generated with the no data.

So, Could you please give me some hints about the variables in Drools. My whole process example is composed of 2 user tasks only:
Thanks,



On Tue, Aug 7, 2012 at 4:44 PM, Tihomir Surdilovic <tsurdilo@redhat.com> wrote:
Task Form generation parses your process BPMN2 and it looks as you have
some issues with it - click on the "BPMN2" button in the Designer footer
and then either provide the BPMN2 shown, or the server log error(s) it
generates. If you get errors, provide those, and also click on the
"JSON" button in the footer and provide the JSON representation of your
process.

You can click on the "info" button in the Designer header to provide the
Designer version you are using...that will help as well

Thanks.
Tihomir
On 8/7/12 9:02 AM, Sadiroveski wrote:
> Dear helpers,
>
> I designed process in drools with human tasks included, add the variables,
> inputsets and bindings.
> When I clicked on the "Generate Task Form Templates", to add forms I got the
> following:
>
> ----------------------------------------------------------------------------------------
> type Exception report
>
> message
>
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
>
> exception
>
> java.lang.ArrayIndexOutOfBoundsException: 1
>
> org.jbpm.designer.bpmn2.impl.Bpmn2JsonUnmarshaller.applyTaskProperties(Bpmn2JsonUnmarshaller.java:3482)
>
> org.jbpm.designer.bpmn2.impl.Bpmn2JsonUnmarshaller.applyProperties(Bpmn2JsonUnmarshaller.java:1921)
>
> org.jbpm.designer.bpmn2.impl.Bpmn2JsonUnmarshaller.unmarshallItem(Bpmn2JsonUnmarshaller.java:1645)
>
> org.jbpm.designer.bpmn2.impl.Bpmn2JsonUnmarshaller.unmarshallItem(Bpmn2JsonUnmarshaller.java:1560)
>
> org.jbpm.designer.bpmn2.impl.Bpmn2JsonUnmarshaller.unmarshall(Bpmn2JsonUnmarshaller.java:225)
>
> org.jbpm.designer.bpmn2.impl.Bpmn2JsonUnmarshaller.unmarshall(Bpmn2JsonUnmarshaller.java:201)
>
> org.jbpm.designer.web.server.TaskFormsServlet.doPost(TaskFormsServlet.java:73)
>       javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
>       javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
>
> org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70)
>
> note The full stack trace of the root cause is available in the JBoss
> Web/7.0.1.Final logs.
> -------------------------------------------------------------------------------------------
>
>
> Any help please,
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Error-in-Drools-when-clicking-Generate-Task-Form-Template-tp4019040.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

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