cadence-workflowtemporal-workflowuber-cadence

Visualizing Cadence Workflows


What is the best way to visualize cadence workflow for users?

I want to show users the different steps of the workflow in a high level view (something similar to what most food delivery apps have: order placed -> preparing food -> food is on it’s way -> order delivered).

I am not interested in showing users the actual cadence activities that are executed, as i don’t want them to see the details of my workflow, i just want to visualize some kind of high level stages that are of interest to them.

One way would be to have the high level description of my workflow persisted and do the transitions of states inside the workflow code itself (upon starting activity X mark stage Y as started etc.). However i am trying to keep this concern separated from my workflow code.

Is there any other way I can achieve that?

Note: I am using the Java client with Spring boot


Solution

  • Workflow represents your business logic. The high level view presented to the user is part of the business logic. So I don't see any problem with maintaining the state for this view inside the workflow and updating it when appropriate. It is a pretty common pattern found in many Cadence/Temporal workflows.