简体   繁体   English

可视化节奏工作流程

[英]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.).一种方法是保持对我的工作流的高级描述,并在工作流代码本身内部进行状态转换(在启动活动 X 时将阶段 Y 标记为已启动等)。 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注意:我正在使用带有 Spring boot 的 Java 客户端

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.这是在许多 Cadence/ Temporal工作流程中发现的非常常见的模式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM