How to Make a Process Form Reusable in the Activiti Enterprise BPM Suite

Activiti Editor

If you have ever created a process in the Activiti Enterprise BPM Suite, you have probably created forms within that process. If so, you may have run into that painful moment when you realize that the form you built within the process is not reusable to other processes. Luckily, there is an easy remedy, with a little tinkering in the database.

PLEASE NOTE: This is a useful hack, but a hack nonetheless. Please do not consider this a best practice. You should make every effort to avoid making direct database modifications.

In short, you need to do the following:

  1. Find the Form ID, available in the URL address bar on the form page.
  2. Find the row in the Activiti 'MODEL' table with that Form ID value in the ID field.
  3. Replace the value in the 'REFERENCE_ID' field with a null value.
For more detail, I've included a step by step guide.

Find the Form ID

Within the process definition, select the task with the desired form. Select the 'Referenced form' value. In this example it is named 'Update Address Form'.

BPMN Editor

Click the ‘Open’ button.

Form Reference

The form will open on your screen. Look at the browser’s URL address bar. Take a note of the last part of the URL. It is the form’s ID.

Form Page

Find the Row in the MODEL Table in the Activiti Database

Next, open the Activiti database's 'MODEL' table. Find the record with a matching ID (in this case '2007'). You'll notice a value in the 'REFERENCE_ID' field. This is the ID of the process model to which the form is currently associated. That process model is also in this table and can be seen with the ID 2006.

Database Table

Update the Database

Remove the value in the REFERENCE_ID field for your form, leaving a null value in its place. Please note that modifying any system's underlying database comes with some risk. You should understand databases systems if you are going to make this change, and ideally, be in a development environment.

Update Database

That’s it! Now, if you navigate to the Forms page in the Kickstart app you will see your form listed as a reusable form.

Reusable Form

Jason Jolley
Jason Jolley
Director, Application Development

My research interests include leading engineering teams, cloud technologies, and applying technology to make an impact in daily life.

comments powered by Disqus