Shows a New User Registration process orchestrated in Camunda Run. Shows how to bridge to an RPA solution using embedded Camunda Engine in a spring-boot application that acts as one micro-service in the New User Registration orchestration.
- prepare 3 terminal windows
-
start with user registration process downloaded from Cawemo:
Open 1-new-user-registration-cawemo.bpmn in Camunda Modeler and add automation information:
- set process name: New User Registration
- add start form
- form field:
- id=
email
- type=
string
- label=
Email address
- validation=
required
- id=
- form field:
- id=
newsletter
- type=
boolean
- label=
Wanna receive newsletter?
- id=
- form field:
- add form for the single user task
- form field
- id=
primate_id
- type=
string
- label=
Primate ID
- validation=
required
- id=
- form field
- add automation stuff for Camunda Run using external task pattern
- SF-task:
- topic=
salesforceService
- topic=
- Address Verification:
- topic=
emailService
- Input mapping: id=
subject
, text=Confirm your email address '${email}'
- topic=
- Welcome:
- topic=
emailService
- Input mapping: id=
subject
, Text=Welcome!
- topic=
- Reminder:
- topic=
emailService
- Input mapping: id=
subject
, Text=We're waitin'...
- topic=
- SF-task:
- gateway
- no: default flow
- yes: Expression=
${newsletter == true}
- add message definition
- Message name:
confirm
- Message name:
- timer boundary:
- duration
PT30S
so the result should be like 2-new-user-registration-automated.bpmn.
-
start Camunda Run docker container
- CE:
docker run -d --rm --name camunda -p 8080:8080 camunda/camunda-bpm-platform:run-7.13.0
- EE:
docker run -d --rm --name camunda -p 8080:8080 -v $HOME/.camunda/license.txt:/camunda/.camunda/license.txt registry.camunda.cloud/cambpm-ee/camunda-bpm-platform-ee:run-7.13.1
- CE:
-
deploy process via deploy button in Camunda Modeler
-
start process via Camunda Tasklist
- email:
[email protected]
- newsletter:
yes
- email:
-
Check Camunda Cockpit, see process instance waiting for external task
-
implement external task workers for salesforce and mail tasks using the template
-
start task workers
node js-workers/mail.js
node js-workers/sf.js
-
observe that salesforce worker immediately picks up some work
-
check in cockpit that we're waiting for user task to put e-mail address into Primate
-
do that user task
-
check in cockpit that the process instance went ahead and now waits at e-mail confirmation receive task
-
use swagger-editor for learning how to hand in message via REST
- https://editor.swagger.io
- load openapi-7.13.0.json
- find message endpoint and execute via curl with following body:
{ "messageName": "confirm", "correlationKeys": { "email": { "value": "[email protected]", "type": "String" } } }
-
enjoy your first finished process instance by
- showing history in Camunda Cockpit
- inspecting log output of mail worker
-
upgrade model to use RPA bot instead of user task, like in 3-new-user-registration-automated-rpa.bpmn
- change user task to external with topic=
violetPyramidService
- change user task to external with topic=
-
deploy that process as new version to Camunda Run via Camunda Modeler
-
explain the rpa-worker
- show process
- explain how it is started: ExternalTaskWorker.java
- show that we mock a long-running RPA product: VioletPyramid.java
-
start the spring boot app in rpa-worker
-
start a new instance via Camunda Tasklist
- email:
[email protected]
- newsletter:
yes
- email:
-
check in Camunda Cockpit history view that it runs through the process up to the point where we wait for confirmation e-mail