[jboss-user] [jBPM] - jBPM 4: Programmatically create Tasks and mapping them to process instance id

Prachi M do-not-reply at jboss.com
Thu Dec 23 01:44:35 EST 2010

Prachi M [http://community.jboss.org/people/mukh.prac] created the discussion

"jBPM 4: Programmatically create Tasks and mapping them to process instance id"

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

Hello Everyone,

I am using jBPM 4.3 and need to create a task using jBPM APIs. The number of tasks are not defined during process deployment, hence every execution of the process should be able to create some number of tasks dynamically.

As given in the developer guide, I am using the below snippet:

Task newTask = taskService.newTask();
newTask.setName("Dummy sub task");

The task gets created successfully, however in JBPM4_TASK table, the processinstance_id, execution_id etc parameters get saved as null.
I need to map the newly created task with the process instance id so that when I query the tasks for a particular execution id, I get this task listed as well.

Please provide some pointers on how can I avoid the null values getting persisted in the database.

Thanks in advance.


Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101223/d42950fa/attachment.html 

More information about the jboss-user mailing list