jBPM Form Builder has changed a lot in the last week. We can finally add menu items to the server configuration from the UI, so you can save custom UI components to be reused by other users, or by you at some other time. Here’s a small demo to see it working. Here’s a current snapshot of the tool:
To make this work, a small refactor had to be done. Since GWT doesn’t seem to support reflection on client side code, a map implementation of the methods in the representational model had to be added. In this way, all objects know how to repopulate themselves from a Map object and how to export themselves to a Map object.
On my next update, i’ll try and have an exposed REST interface for form definitions, of which this is a tentative model:
String saveForm( FormRepresentation form ): It would recieve form representation though JSON, and return an identifier you can use to refer to the saved form definition instance later on.
String saveFormItem( FormItemRepresentation item ): The same as saveForm, but for a visual component that would be a part of a form later on. Also returns an identifier you can use to refer to the save form item definition instance later on.
UIComponentWrapper generateFormTemplate( String formId, String language ): Generates a wrapper with information about a given form template or visual component and its expected inputs
UIComponentWrapper generateFormItemTemplate( String formItemId, String language ): Same as before, but for a form item.
Feel free to share any points of view on this interface, and see you next week!