Should I look at source of Ubefire, KIE Workbench, jBPM console NG?
These are pretty big projects and I don't know where to start.
Any directions are welcome!
Form nowadays can be consumed inside the KIE-WB, but we are working in a way to expose forms to be consumed by third party applications.
Forms usually take the information of the task data input and data output mappings to render what is required for the user to fill, and internally it provides the mechanism to copy that information to the process scope.
Forms are files stored inside the repository of the KIE Workbench, but if you can store them in any place you want if you don't want to use the KIE-Workbench, but you will need to write all the integration code for that.
So my question to you is: Where do you want to use the forms? Which technologies are you using to develop your application?
How to use/integrate with the forms is really up to your requirements, you need to first find out what you need.
Hello Salaboy and thanks for your help.
Which technologies are you using to develop your application?
I'm working on a Java application which is built on top of Dropwizard, it's basically a web interface for basic jBPM (KIE/Drools currently I'm lost with the naming conventions) operations.
The user can upload BPMN2 processes through the web interface. These processes can be started and stopped through the same interface.
From the users' perspective it's something similar to what you already have in KIE Workbench > Process Management > Process Definitions.
So far I used mostly Service Tasks, they required no user interaction so the whole thing was pretty straightforward:
- The user started a process instance through the web interface
- Based on the BPMN2 that the user uploaded I created the KnowledgeBase/StatefulKnowledgeSession and started a ProcessInstance
- Drools/jBPM executed the flow
Where do you want to use the forms?
Basically I want to create something similar to the Tasks List page of the KIE Workbench.
I have to find a way to retrieve the tasks that can be claimed by the current user and to process and display the form that belongs to the user task that the user started.
The first two steps are fairly simple because the TaskService API allows me to do something like:
taskService.getTasksAssignedAsPotentialOwner("sales-rep", "en-UK"); ... taskService.claim(task1.getId(), "sales-rep"); taskService.start(task1.getId(), "sales-rep"); ...
at this point I should process and return the form to the user, but I have no idea how.
I hope most of my requirements are clear, your help is greatly appreciated!
So are you planning to build your own forms? or use the form modeller inside kie-wb to design your form. I guess that if you are building something similar to KIE-WB you are not planning to use the form modeller inside it, am I right?
If you are not planning to use the form modeller you will need to get the task internal information and based on that build your (dynamic or hardcoded) forms.
Take a look at the jbpm-console-ng/jbpm-console-ng-human-task and jbpm-console-ng-human-task-form projects for more information about how to retrieve the data that you need.
Yes, you are right I want to build something similar to the form-modeler inside KIE-WB.
I'm not planning to use the built-in form modeler but want to build my own.