Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Towards Modelling Processes

Towards Modelling Processes

Processes are at the heart of how many businesses operate. The processes are governed by policies, agreed upon with contracts, and guided by documents. In software systems on the other hand, we often bury the processes. There’s a domain model for sure, but it’s all about “things” and “actions”. Let’s explore how Event Sourcing allows us to explicitly model the effects of changes over time.

http://verraes.net/2015/05/towards-modelling-processes/

Mathias Verraes

May 22, 2015
Tweet

More Decks by Mathias Verraes

Other Decks in Programming

Transcript

  1. “As a shopper, in order to buy stuff Given I

    have a product X with price EUR100 When I …”
  2. “As a shop owner, in order to sell stuff Given

    I have a product X, And that product is priced EUR 100 in the pricing table When I …”
  3. “As a shopper, in order to buy stuff Given the

    shop owner has priced a product X at EUR100 When I …”
  4. What changes? Why does it change? Under what circumstances? Who

    changes it? How often does it change? What are the consequences of that change?
  5. time event sourcing E E E E E E A

    E = domain event, A = artefact
  6. E C B Invoice was paid Invoice was partially paid

    Pay for invoice Paid amount < Invoice amount Paid amount = Invoice amount
  7. E C B Invoice was paid Invoice was partially paid

    Paid amount < Invoice amount Paid amount = Invoice amount Paid amount > Invoice amount Invoice was overpaid
  8. C B E C E C B E All paid

    amounts < Invoice amount All paid amounts = Invoice amount All paid amounts > Invoice amount
  9. C B E C E C B E E Invoice

    was paid Invoice was partially paid
  10. “Neither a static view nor a dynamic view can be

    the whole view.” Gerald M. Weinberg — Rethinking Systems Analysis and Design
  11. E E E E E E E E collaborative construction

    execution artefact process process
  12. E E E 1 2 3 4 policy changes Running

    process affected by policy changes B B