Hello,
           We have a workflow when we receive events into the service. But
we don't have a way to choreograph or orchestrate the workflow. The
services are all independent and receive and respond to events.

Since there is no order imposed by the event queues I was thinking of
storing a simple state machine in the table.

1. Order PENDING
2. Order line 1 PENDING
3. Order line 2 PENDING
4. Order line 1 PROCESSED
5. Order line 2 PROCESSED
6. Order PROCESSED

Order and Order lines can be PROCESSED in any order. But at the end all
lines should be  PROCESSED and then the order is also  PROCESSED.
I won't be able to use any PostgreSql functions because we don't depend on
those features.

Are there any PostgreSql features that could support this pattern ? Is it
just like any other eventually consistent pattern ?

Thanks

Reply via email to