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 and CUSTOMER_REVENUE:
  1. <form>
  2. <label for="customerId">Customer Id:</label>
  3. <input type="text" id="customerId"
  4. cam-variable-name="CUSTOMER_ID"
  5. cam-variable-type="String">
  6. <label for="customerRevenue">Customer Revenue:</label>
  7. <input type="text" id="customerRevenue"
  8. cam-variable-name="CUSTOMER_REVENUE"
  9. cam-variable-type="Double">
  10. </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/