This reference covers the features of the Camunda BPM Forms SDK. The Forms SDK simplifies theimplementation of user task forms in HTML5 / JavaScript based Applications. The Forms SDK itself iswritten in JavaScript and can be added to any JavaScript based Application.
The Forms SDK and Camunda Tasklist
Camunda Tasklist uses the Form SDK for providing support for Embedded Forms. By default, thetasklist uses the Form SDKs AngularJS integration.
Features
The Forms SDK provides the following features:
- Form handling: attach to a form existing in the DOM or load a form from a URL.
- Variable handling: load and submit variables used in the form.
- Script handling: execute custom JavaScript in Forms
- Angular JS Integration: The Forms SDK optionally integrates with AngularJS to take advantageof AngularJS form validation and other AngularJS goodies.
The following is a simple example of a form with two input fields binding to process variablesCUSTOMER_ID
andCUSTOMER_REVENUE
:
<form>
<label for="customerId">Customer Id:</label>
<input type="text" id="customerId"
cam-variable-name="CUSTOMER_ID"
cam-variable-type="String">
<label for="customerRevenue">Customer Revenue:</label>
<input type="text" id="customerRevenue"
cam-variable-name="CUSTOMER_REVENUE"
cam-variable-type="Double">
</form>
Anti Features
The Forms SDK is intended to be lean and small. By design it is not concerned with things like
- Form Validation: Instead, integrate with existing frameworks such as AngularJS.
- Components / Widgets: Instead, integrate nicely with existing component libraries like jQuery UI, AngularUI, …
- Form Generation: Instead, allow users to leverage the complete power of HTML and JavaScript toimplement complex forms.
原文: https://docs.camunda.org/manual/7.9/reference/embedded-forms/