Search code examples
jbpmbusiness-process-management

How to Retrieve Form filled data in JBPM 6


I am creating an application using Jbpm 6.4 . Every user task has a task form and I completed them through JBPM console . But I want to know how jbpm is storing this data .Is there any way to retrieve these data's for future purpose.


Solution

  • Yes, it is possible to retrieve the Task data since JBPM 6.4. In the previous versions, only Process Instance variables were persisted, but version 6.4 introduced the Task variables auditing. Task audit logs are stored in the TaskVariableImpl table.

    Those variables are stored as simple Strings, like every other audit log in JBPM. Because of this, you have to implement custom toString() methods for your custom classes used as Task variables.

    If you want to query for some of the fields of your complex classes, then you can implement your own org.kie.internal.task.api.TaskVariableIndexer. There is a great example at the official documentation.

    Although you can access Task variables in this general way, but for complex queries and high usage I would suggest to store the required fields in your own tables for better handling.