Orchestrate the Chaos: Process Automation in Modern Architectures

A presentation at CodeMash in January 2024 in Sandusky, OH 44870, USA by Samantha Holstine

Slide 1

Slide 1

Orchestrate the Chaos: Process automation in modern architectures CodeMash / January 11, 2023

Slide 2

Slide 2

Poll ■ How many here use microservice architectures? ■ Has anyone struggled to explain data flow/logic between technical and non-technical teams? ■ Has anyone heard of BPMN? DMN? BPM? ■ Has anyone heard of Camunda?

Slide 3

Slide 3

Who am I? ■ Developer Advocate @ Camunda ■ Denver, CO Samantha Holstine @sholstine620 she/her ■ Fun fact: I’m a dance fitness and studio rowing instructor in my free time

Slide 4

Slide 4

What is “Modern Software Architecture”

Slide 5

Slide 5

Slide 6

Slide 6

Image: (Cloudinary) https://dev.to/alex_barashkov/microservices-vs-monolith-architecture-4l1m

Slide 7

Slide 7

Modern architecture designs are great at optimizing resource usage …

Slide 8

Slide 8

… now diagram the business logic / data flow …

Slide 9

Slide 9

Slide 10

Slide 10

Image: (“Microservices” - KRAZAM) https://www.youtube.com/watch?v=y8OnoxKotPQ

Slide 11

Slide 11

Hard problems to solve Documentation Data flow diagrams look like spaghetti Timers Alerts, stuck/idle processes, notifications Interrupting messages Your application is already executing code, but something has changed and you need to interrupt it and handle it differently Changes to business logic All your services are running nicely together, but now a new service is added that integrates with other existing services …

Slide 12

Slide 12

Forget services and infrastructure. Let’s think about it in terms of processes

Slide 13

Slide 13

“…a collection of related, structured activities or tasks performed by people or equipment”

Slide 14

Slide 14

Real World Scenario

Slide 15

Slide 15

Truck Permits A local municipality needs to issue permits to trucking companies: ● Trucking company fills out a form ● A price is determined for the permit ● The company pays for the permit ● The permit is issued

Slide 16

Slide 16

Truck Permits A local municipality needs to issue permits to trucking companies: ● ● ● ● Trucking company fills out a form -> UserForm microservice A price is determined for the permit -> PermitMatch microservice The company pays for the permit -> Payments microservice The permit is issued -> IssuePermit microservice

Slide 17

Slide 17

Slide 18

Slide 18

New requirement! “We need the permit turned into a PDF, and email notifications to the user and to us”

Slide 19

Slide 19

Truck Permits A local municipality needs to issue permits to trucking companies: ● ● ● ● Trucking company fills out a form -> UserForm microservice A price is determined for the permit -> PermitMatch microservice The company pays for the permit -> Payments microservice The permit is issued -> IssuePermit microservice -> PDF microservice -> Email microservice

Slide 20

Slide 20

Slide 21

Slide 21

New requirement! “A user tried to fill in the form, but it didn’t match a permit!”

Slide 22

Slide 22

Slide 23

Slide 23

New requirement! “If they don’t pay in X days, the permit needs to be canceled!”

Slide 24

Slide 24

How might you solve this?

Slide 25

Slide 25

Introducing BPMN Business Process d n a l e d Mo n o i t a t o N Maintained spec Visualization Bridge communication ISO/IEC 19510 spec maintained by OMG (Object Management Group) Easily understand complex processes; no more spaghetti! Simplify discussions with stakeholders; unify design and implementation

Slide 26

Slide 26

Slide 27

Slide 27

Slide 28

Slide 28

Remember this? “If they don’t pay in X days, the permit needs to be canceled!”

Slide 29

Slide 29

Slide 30

Slide 30

… That’s great, dude, but that’s just a diagram.

Slide 31

Slide 31

… or is it?!

Slide 32

Slide 32

BPMN Engines (Workflow Management Systems)

Slide 33

Slide 33

Many options to choose from https://bpmn-miwg.github.io/bpmn-miwg-tools/

Slide 34

Slide 34

Camunda - The Universal Process Orchestrator Orchestrate Automate Transform Complex process flows across people, systems and devices. Any process, anywhere. Your organization toward a digital future. Collaborate Flexibility All Endpoints Human Work AI Business Rules Micro Services RPA API IoT Systems (legacy + homegrown)

Slide 35

Slide 35

Slide 36

Slide 36

Zeebe Architecture Zeebe Cluster Broker Zeebe Client gRPC Gateway Microservices / Apps Broker Broker

Slide 37

Slide 37

Slide 38

Slide 38

Slide 39

Slide 39

The state of a process is managed by the workflow engine, not the application. The data is managed by the application, not the engine.

Slide 40

Slide 40

New requirement! “For some permits, they need additional approval before collecting payment.”

Slide 41

Slide 41

Slide 42

Slide 42

Slide 43

Slide 43

New requirement! “Oh, and we should probably send a payment reminder before we cancel the permit.”

Slide 44

Slide 44

Errors and reminders

Slide 45

Slide 45

Errors and reminders

Slide 46

Slide 46

That was easy!

Slide 47

Slide 47

Let’s review 1 BPMN 2 BPMN Engines 3 Simplified management Open spec that defines processes in an organized, understandable way Execute the process as drawn, connecting tasks to external services. State of each process is controlled by the engine, not the application. Easily add additional tasks without changing existing application; engines provide management tools to monitor performance etc.

Slide 48

Slide 48

Visit the Camunda Booth! Booth #N3 Play trivia, donate to charities Ask questions

Slide 49

Slide 49

Questions?

Slide 50

Slide 50

Resources ● Camunda Academy – free courses on BPMN and Camunda ● BPMN 2.0 documentation ● Camunda Code Studio on YouTube ● Camunda Forum