This Quickstart demonstrates how to use the Generated Forms Feature. Generated Forms are HTML5 forms which are generated from Xml Metadata provided in BPMN 2.0 Xml. The metadata can be specified using camunda modeler:
From this, the process engine can generate a HTML form which can be displayed in the tasklist:
Both startEvent
and the userTask
have form metadata defined:
<bpmn2:startEvent id="StartEvent_1" name="Loan Request Received">
<bpmn2:extensionElements>
<camunda:formData>
<camunda:formField id="firstname" label="Firstname" type="string">
<camunda:validation>
<camunda:constraint name="maxlength" config="25"/>
<camunda:constraint name="required"/>
</camunda:validation>
</camunda:formField>
<camunda:formField id="lastname" label="Lastname" type="string">
<camunda:validation>
<camunda:constraint name="maxlength" config="25"/>
<camunda:constraint name="required"/>
</camunda:validation>
</camunda:formField>
<camunda:formField id="netIncome" label="Net Income" type="long">
<camunda:validation>
<camunda:constraint name="required"/>
</camunda:validation>
</camunda:formField>
<camunda:formField id="loanAmmount" label="Loan Ammount" type="long">
<camunda:validation>
<camunda:constraint name="required"/>
</camunda:validation>
</camunda:formField>
<camunda:formField id="loanType" label="Loan Type" type="enum">
<camunda:validation>
<camunda:constraint name="required"/>
</camunda:validation>
<camunda:value id="mortage" name="Mortage Loan (5%)"/>
<camunda:value id="cashAdvance" name="Cash Advance (10%)"/>
</camunda:formField>
</camunda:formData>
</bpmn2:extensionElements>
<bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
</bpmn2:startEvent>
From this form metadata, an HTML Taskform is generated and displayed in the Tasklist.
- Checkout the project with Git
- Build the project with maven
- Deploy the war file to a camunda BPM platform distribution
- Go to the Tasklist and start a process instance for the process named "Generated Forms Quickstart"