This guide covers two walkthroughs: Quick Start, and Detailed Walkthrough.
- Deploy the platform using the SDK.
- Install Camunda Modeler
- Install Postman
- Open/Login to the following applications:
- DigitalState Admin
- DigitalState Portal
- Camunda Cockpit
- Formio Admin
- Postman (desktop)
- Camunda Modeler (desktop)
- In Camunda Modeler create a BPMN for your business process that orchestrate your service.
- Set
Process Id
- Set
Process Name
- Ensure process is marked as
Executable
- Save your .bpmn file with the same name as the
Process Id
. (This is just a 'quaility of life' best practice) - Draw a basic process to get yourself started and set your Start Event Form-Key. The
Form-Key
uses the pattern[formsystem]:[UniqueFormName]
. Example:formio:mystartform1
. - Set the
Form-Key
for the User Task using the same pattern as the Start Event. - When configuring User Tasks you must configure a Candidate Group and optionally a Assignee. The
Assignee
field must be pre-pended with the Identity Type (Individual, Organization, Staff). TheAssignee
andCandidate Group
fields use Identity UUIDs. The Candidate Group uses the IdentityBusiness Unit
for its UUIDs and therefore no pre-pending of Identity Type is required in theCandidate Group
field.
Example:
Assignee:Staff:e32f09b7-e1cf-4a91-a0e1-6822bf47a662
.
Candidate Group:c11c546e-bd01-47cf-97da-e25388357b5a
.
In practice these fields would typically be dynamically generated based on scripts, DMN, and Expression Language usage. Note that permissions are inherited from the Candidate Group; a User will not be able to access the Task if they do not have the proper permissions for the Candidate Group UUID (the Business Unit Identity). - The placeholder user task is a Quality of Life best practice that ensures a process does not complete until the developer chooses. It allows the developer to inspect process variables through the Camunda Cockpit (Camunda Community Edition) as only active processes are shown in the Camunda Cockpit.
- Create your End Event
Save your .bpmn file and you are ready to create your forms.
NOTE: User Task Support in the DigitalState API / the Tasks Microservice, is a Enterprise Only feature and is not included as Community Open Source. Contract DigitalState for Enterprise Access.
-
In Formio Admin, open the Form Editor
-
Set form Title, Name and Path. The Path is the name that you used in your Form-Key on the Start Event.
-
Add some fields
-
You will now be on the Form View/Input page; select the
Form Actions
tab and remove the "Save Submission` action. -
Go to the
Permissions
tab and delete all permissions. -
In the
Permissions
tab, add theAnonymous
role to the "Create own Submissions" permission.
Repeat the steps from Start Event Form, for the User Task Form but use the User Task's Form-Key (myuserform1
).
-
When configuring a field, you can auto-populate data from the current Identity accessing the Form (during runtime) or data from the active Camunda Process Instance.
-
To access Identity Context Data use the following:
- Edit a Form Field: Select the Data Tab: and edit the
Default Value
field. - The following pattern is used:
ds[identity].persona.data.first_name
Where `ds` is the namespace identifier. `[identity]` is the context to which permissions and the resolver is to function in. `identity` tells the resolver to use the current user's identity for permissions and data access. The `.persona` accesses the current Identity's persona in the Identities microservice. The `.data` accesses the `data` column in the Identity (`data` is a JSON column). The `first_name` is a JSON property accessor for the json object inside of the `data` column. Anything after `.data` is parsed as a JSON property and array accessor using standard json accessor patterns. ![Formio Data Resolver](./resources/formio/formio-data-resolver.png) - Edit a Form Field: Select the Data Tab: and edit the
-
To access the BPM Content Data use the following:
- Edit a Form Field: Select the Data Tab: and edit the
Default Value
field. - The following pattern is used:
ds[bpm].task.variable.start_data.someKey
The pattern is the same as the Identity pattern by with some minor differences: Where `bpm` is the context that tells the form to detect what User Task the form is being called from and what Process Instance the User Task is apart of. Where `.task.variable` accesses the variables in the Task sub-system in Camunda. The `start_data` is the Process Variable that stores the Start Event's submission / json variables. The `someKey` is the JSON property inside of the `start_data` variable. Use JSON accessors the same way they are used in the Identity context to access JSON properties. Note that `start_data` can be changed for any JSON variable that is created during the Process Instance life-cycle. - Edit a Form Field: Select the Data Tab: and edit the
The CMS Microservice manages the storage of translation files. See the docs for how translations are added into the CMS.
-
Open the DigitalState Admin web app
-
Navigate the menu to Services > Service Directory. and Create a new Service.
-
Once the service is created, create a Service Scenario inside of the previously created Service. Use the
BPM
scenario type. -
Set the
Process Definition Key
to theProcess Id
value that was set in your BPMN file and configure the rest of the mandatory Service Scenario fields.
- Open Postman
- In the DigitalState collection navigate to: Camunda > Deployment >
POST /deployment
- Configure the deployment configs in the request body (Other than the deployment name, and the BPMN file, the rest can typically remain the same as the defaults in the Postman collection)
- Add the BPMN file to the request
- Send the Request/Deploy the BPMN file.
- In the DigitalState Portal web app, to go Services > Directory and select the service you created in the DigitalState Admin web app. In the Scenario you created, select the activation button and the form should popup.
- Fill out the form and press submit.
- Go to the Camunda Cockpit application and navigate to Processes > My Process 1 (or whatever name you gave your BPMN process in the
Process Name
field), and you will see the active process. Selecting into the UUID of the process will show you the specific process instance and the variables related to that process.