Camunda is a comprehensive workflow automation and decision-making platform that provides process management solutions for organizations of
all sizes. It offers tools for creating, managing, and deploying workflows and decision models in production environments.
In this article, we will use an example from the Camunda
repository, Using React Forms with Tasklist,
and modify it so that the forms are displayed using FormEngine.
Requirements
To follow along, you will need the following:
- Java Development Kit (JDK) 17
- Camunda 7 Community Edition
- Camunda Modeler
Ensure that both Camunda 7 Community Edition and Camunda Modeler are installed on your system if they are not already.
Starting with the React Example
The Camunda repository on GitHub provides a simple and
clear instruction for using React
in Tasklist. Let’s walk through it together.
-
Add
loadReact.js to Camunda Tasklist:
Download loadReact.js
and place it in the app/tasklist/scripts/react directory of the Camunda Tasklist webapp. For example, if you are using Tomcat, the path
will be /webapps/camunda/app/tasklist/scripts/react.
This script will load React and ReactDOM from a CDN and add them to the global scope. If you prefer to use different versions of React,
adjust the import paths in the script accordingly.
-
Add the loader as a custom script:
Modify the
app/tasklist/scripts/config.js file of the Camunda Tasklist webapp to include the loader script. For Tomcat, this file is
located at /webapps/camunda/app/tasklist/scripts/config.js. Update the file as shown in
the example.
customScripts: [
'scripts/react/loadReact.js'
]
Launch Camunda if it is not already running. Next, we need to upload the process definition and forms from GitHub, then upload them to
Camunda using Camunda Modeler and start the process. Let’s do it step by step:
- Download the following files:
task-form.html
-
Open Camunda Modeler and load the
react-example.bpmn file:
-
Update the form keys:
-
Click the “Invoice Received” element and change the Form key from
embedded:app:start-form.html
to embedded:deployment:start-form.html:
-
Click the “Approve Invoice” element and change the Form key from
embedded:app:task-form.html to embedded:deployment:task-form.html:
- Deploy the process:
-
Click the Rocket button at the bottom of the screen, then click the plus button next to “Include additional files” and add the
previously downloaded
start-form.html and task-form.html files:
-
Click the “Deploy” button. You should see a message indicating that the Process Definition has been successfully deployed:
To ensure everything works correctly, follow these steps to test the setup in the Camunda web interface. If Camunda is running locally, the
address will be something like http://localhost:8080/camunda-welcome/index.html:
-
Open the Camunda web interface:
-
Access the Tasklist:
- Click on the Tasklist image.
- Log in using the credentials demo/demo:
- Start the process:
- Click on the “Start Process” button on the top panel:
- Select “React example” in the “Start process” window:
- Fill in the start form:
- The form for starting the process, uploaded from
start-form.html, should now be displayed.
- Fill in the form with the necessary data and click the “Start” button:
- View the task list:
- The process has started. Now click on “All Tasks” on the left panel.
- You should see your task in the task list:
- Claim the task:
- Click on the task:
- Claim the task by clicking on the “Claim” link, which will change to “Demo Demo”:
- Complete the task:
- The form you see is uploaded from the
task-form.html file.
- Fill out the form by clicking on the “I approve this Invoice” checkbox, then click the “Complete” button:
- Verify completion:
- The task will be completed:
To connect FormEngine to Camunda, we will use a package that includes a set of components based on React Suite. These components are
utilized in our demo.
First, we need two forms to replace the React forms from the Camunda example. We will omit the process of creating these forms, as it is
straightforward to accomplish. For instance, you can use our demo. Simply drag and drop the necessary
components onto the form and configure their properties as required. Below are the JSON files containing the forms themselves.
You can see the “start-form” in the screenshot below:
The second form is similar to the first.
This is what the second form looks like:
When connecting FormEngine to Camunda, we decided to use a bundle designed for use
on any web page. This method does not require a separate React connection.
During the connection process, we discovered that Camunda uses a strict Content Security Policy, which prohibits some inline CSS used in the
bundle. Therefore, we will connect the component styles separately.
-
Add
loadFormEngine.js:
Place loadFormEngine.js in app/tasklist/scripts/formEngine of the Camunda Tasklist webapp (e.g., for Tomcat, it will
be /webapps/camunda/app/tasklist/scripts/formEngine).
const formEngine = document.createElement('script');
formEngine.crossOrigin = true;
formEngine.src = 'https://unpkg.com/@react-form-builder/viewer-bundle@1.2.0/dist/index.umd.js';
document.body.append(formEngine);
-
Add the loader to
config.js:
Modify app/tasklist/scripts/config.js of the Camunda Tasklist webapp to include the loader script. For Tomcat, the path will
be /webapps/camunda/app/tasklist/scripts/config.js.
customScripts: [
'scripts/react/loadReact.js',
// highlight-next-line
'scripts/formEngine/loadFormEngine.js'
]
-
Download and add the CSS files:
Download the rsuite-no-reset.min.css file and
the formengine-rsuite.css file. Place them in
the
app/tasklist/styles folder. To avoid configuring the CSP policy, download the styles locally.
-
Modify
user-styles.css:
Add the following highlighted lines to app/tasklist/styles/user-styles.css:
/*
.navbar-brand {
text-indent: -999em;
background-image: url(./path/to/the/logo.png);
width: 80px;
}
[cam-widget-header] {
border-bottom-color: blue;
}
*/
@import url('./rsuite-no-reset.min.css');
@import url('./formengine-rsuite.css');
.rs-picker-select-menu.rs-picker-popup {
z-index: 2000;
}
In the code of both forms, we will use a simple renderFormEngineForm function that will render the form into an HTML element.
The function accepts the following parameters:
form is the JSON of the form.
container is the HTML element where the form will be rendered.
additionalProps are the additional properties of
the FormViewer component.
function renderFormEngineForm(form, container, additionalProps) {
const viewerRef = {current: null};
const viewerBundle = window.FormEngineViewerBundle;
const components = viewerBundle.rSuiteComponents;
const view = components.view.withViewerWrapper(components.RsLocalizationWrapper);
const props = {
getForm: () => form,
view,
viewerRef,
...additionalProps
};
viewerBundle.renderFormViewerTo(container, props);
return viewerRef;
}
Each form’s code will have its own renderCamundaForm function that will link the FormEngine form and the Camunda form, which is stored in
the camForm object. In general, the form code is similar to the forms from the React example. See the form code below for reference.
The JSON for the form and the basic code for rendering the form are included in HTML files for this example. In practice, it’s likely
better to use a separate JavaScript module.
- Deploy the FormEngine Forms:
- Open Camunda Modeler and click the rocket icon button.
- Delete the selected forms
start-form.html and task-form.html.
- Add the forms created for FormEngine.
- Click the Deploy button.
- Open the Camunda Tasklist Web Interface:
- Start the Process:
- Click on the “Start Process” button on the top panel.
- Select “React example” in the “Start process” window. You should see the form made with FormEngine.
- Fill Out the Form and Start the Process:
- Fill out the form and click the Start button.
- The process has started. Now click on “All Tasks” on the left panel.
- Select and Claim the Task:
- Select the created task from the top.
- Claim the task by clicking on the “Claim” link. The link text will change to “Demo Demo”.
- Verify Task Variables and Fill Out the Form:
- You should see that the variables have been populated. Click on the link next to the highlighted text “React Example”.
- The form should be correctly filled out.
- Fill out the form and click Complete.
That’s it! Your FormEngine forms are now running in Camunda.
Conclusion
In this article, we have successfully connected FormEngine as a form rendering engine for Camunda. This allows you to use your custom
components to render forms by passing a set of your components through properties.
If you encounter any issues or have questions, feel free to reach out to us
on GitHub.
Next steps
Last modified on April 16, 2026