一款新的id怎么来设计结构_一种新的设计方法

一款新的id怎么来设计结构

Adding a workflow step (or two) to your app helps people automate their work, by connecting their Slack workflows to your service — now available in developer open beta.

在您的应用程序中添加一个(或两个)工作流程步骤,可以将人们的Slack工作流程连接到您的服务,从而帮助人们实现工作自动化( 现已在开发者开放测试版中提供)

工作流程的未来 (The future of workflows)

Workflow Builder for Slack allows anyone to automate routine process and communication — all in a matter of minutes. Once triggered, a workflow runs a series of steps, like collecting form responses and sending Slack messages.

Slack的Workflow Builder使任何人都可以在几分钟内自动执行例行程序和通信。 触发后,工作流将执行一系列步骤,例如收集表单响应和发送Slack消息。

Now, Workflow Builder is more extensible than ever, because steps from apps can provide new functionality. They can add new features and allow builders to integrate with their everyday tools outside of Slack, all without writing a single line of code.

现在,Workflow Builder比以往任何时候都更具扩展性,因为来自应用程序的步骤可以提供新功能。 他们可以添加新功能,并允许构建者将其日常工具集成到Slack之外,而无需编写任何代码。

Let’s walk through how you (as a Slack app developer) can design your steps, so builders can create powerful workflows that make Slack users’ lives simpler, more pleasant, and more productive.

让我们逐步介绍一下您(作为Slack应用程序开发人员)如何设计步骤,以便构建者可以创建强大的工作流程,使Slack用户的生活更简单,更愉快,更高效。

This guide is paired best with our steps from apps demo and tutorial, which walks through the technical details of workflow development.

该指南与我们的应用程序演示教程步骤最为匹配 ,该指南详细介绍了工作流开发的技术细节。

如何思考设计脚步 (How to think about designing your step)

First, decide whether a builder needs to authenticate an account for your step to work. If it does, design that step configuration view first, since it will be the first part of step setup. Remove anything in that view that isn’t about connecting the necessary account, so that it’s clear how to proceed.

首先,确定构建者是否需要对帐户进行身份验证才能进行操作。 如果是这样,请首先设计该步骤配置视图,因为它将是步骤设置的第一部分。 删除该视图中与连接必要帐户无关的所有内容,以便清楚地了解如何继续。

Then design the main step configuration experience, which should always show which account, if any, is connected and a way to disconnect it. This way, builders are clear on which account is being affected, or which account the step is acting on behalf of.

然后设计主要步骤配置体验,该体验应始终显示连接了哪个帐户(如果有)以及断开连接的方式。 这样,构建者就可以清楚地知道哪个帐户受到影响,或者该步骤代表哪个帐户。

You’ll want to design your step to be as flexible as possible, so builders can leverage all of Workflow Builder’s features. For example:

您将需要设计尽可能灵活的步骤,以便构建者可以利用Workflow Builder的所有功能。 例如:

  • Unbundle individual actions that are part of your core user flows. Instead of a workflow step that shows a form to a user and later creates a record based on that form, configure the step to simply generate a record. This allows builders to create more custom workflow forms. Creating, fetching, updating, and deleting your app’s primary record (i.e. tasks, tickets, leads, etc.) are all great candidates for individual steps.

    取消捆绑属于核心用户流的各个操作。 代替将工作流程显示给用户并随后基于该表单创建记录的工作流步骤,将步骤配置为仅生成记录。 这使构建者可以创建更多自定义工作流程表单。 创建,获取,更新和删除应用程序的主要记录(即任务,故障单,销售线索等)都是单个步骤的理想选择。

  • Enable variable data from previous steps into the configuration of your step.

    在之前的步骤中启用变量数据,然后进入您的步骤配置。

  • Design your step to output variables for later usein a workflow, especially when creating a new record (i.e. a link to a record and its name).

    设计您的步骤以输出变量,以供以后在工作流中使用 ,尤其是在创建新记录(即,指向记录及其名称的链接)时。

  • Ask builders where to send messages instead of assuming. Don’t share to a channel automatically. Instead, let them choose where to send your precomposed message — or allow them to disable sending that message at all. This way, they can send their own message with variables from your step later in the workflow.

    询问建筑商在哪里发送消息,而不是假设。 不要自动分享到频道。 取而代之的是,让他们选择将您预先编写的消息发送到哪里—或者让他们完全禁用发送该消息。 这样,他们可以在工作流程的后续步骤中发送带有变量的自己的消息。

Remember to think of a specific step’s usefulness in the context of a complete workflow. That is, think of your step as a single action on the road to what someone wants to accomplish in Slack. Never assume a builder has prior knowledge of your step (or what it’s doing behind the scenes). You should not only think about your app’s steps in isolation, but also how different steps can build upon one another.

切记在完整的工作流程中考虑特定步骤的有用性。 也就是说,将您的步骤想像成是某人在Slack上想要完成的路上的一个动作。 永远不要以为建设者事先了解您的步骤(或幕后的操作)。 您不仅应单独考虑应用程序的步骤,而且还应考虑不同步骤之间可以如何建立。

If it’s difficult to name your step in a clear and concise way, that’s a sign that you should consider splitting it into multiple steps with simpler names and a more specific purpose. As an added benefit, your configuration UI will get simpler. For example, instead of a step that creates a document and adds content, consider two separate steps that accomplish each action, respectively.

如果很难以简洁明了的方式命名您的步骤,则表明您应考虑将其分为多个步骤,使用更简单的名称和更具体的用途。 另外一个好处是,您的配置UI将变得更加简单。 例如,代替创建文档并添加内容的步骤,可以考虑分别完成每个操作的两个独立步骤。

现实世界中的自动化流程 (A real-world process to automate)

Here’s a simple example.

这是一个简单的例子。

Let’s imagine I’m a designer at a tech company (easy!), where all text must be reviewed by the writing team before I can release my latest designs to the world.

想象一下,我是一家科技公司的设计师(很容易!),在此之前,所有文字都必须由写作团队进行审查,然后才能向世界发布我的最新设计。

My company uses an internal app for project management called Task Manager, so I typically navigate to a website and create a task (including supplemental links and context) for the writing team to review my design.

我的公司使用一个称为“ 任务管理器”的内部应用程序进行项目管理,因此我通常导航到一个网站并创建一个任务(包括补充链接和上下文),以供编写团队审核我的设计。

I want to automate this process for my entire design team, so it’s a perfect Workflow Builder use case. Luckily, the development team that built Task Manager took advantage of the open beta and coded a workflow step for this Slack integration, which makes this easy! ?

我想为整个设计团队自动化此过程,因此这是一个完美的Workflow Builder用例。 幸运的是,构建任务管理器的开发团队利用了公开测试版,并为此Slack集成编写了工作流步骤,这很容易! ?

建立工作流程 (Building a workflow)

My workflow for requesting a review could look like this:

我请求审核的工作流程如下所示:

Image for post
A workflow for requesting a final design review
请求最终设计评审的工作流程

This workflow adds “Request a review” to the ⚡️shortcuts menu in the #design-team channel. When selected, the workflow will prompt users to submit project information, then automatically create a task in Task Managerfor review. It then sends a message with the variable data from the Task Managerworkflow step.

此工作流将“请求评论”添加到#design-team频道的⚡️快捷菜单中。 选中后,工作流将提示用户提交项目信息,然后在任务管理器中自动创建任务以供审核。 然后,它从“ 任务管理器”工作流步骤发送带有可变数据的消息。

配置工作流程步骤 (Configuring a workflow step)

Let’s take a look at how the Task Manager developers structured their step to make this workflow possible.

让我们看一下任务管理器开发人员如何构建步骤以使此工作流程成为可能。

Image for post
A view of the Task Manager step after it’s added to a workflow
将任务管理器步骤添加到工作流后的视图

You’ll notice that in each text field, I can use variables from previous workflow steps through “Insert a variable.” This is how I can send data from the form step to the Task Manager step. ??

您会注意到,在每个文本字段中,我都可以通过“插入变量”使用先前工作流程步骤中的变量。 这就是我可以将数据从表单步骤发送到任务管理器步骤的方式。 ??

Image for post
The new “create a task” step versus the final configured step
新的“创建任务”步骤与最终配置的步骤

As configured above, when someone runs the workflow and completes the form, Workflow Builder will send the final values of the selected variables to the Task Manager app. Voilà! Using a step from a Slack app, I’ve automated the process of requesting reviews for design projects.

按照上面的配置,当有人运行工作流并完成表单时,工作流生成器会将选定变量的最终值发送到任务管理器应用程序。 瞧! 通过使用Slack应用程序中的步骤,我使对设计项目的审阅过程自动化了。

入门 (Getting started)

To spin up your own prototype of this example, you can follow our steps from apps tutorial. Cheers and happy building!

要构建本示例的原型,可以按照apps教程中步骤进行操作 。 欢呼快乐,建设愉快!

We want your questions and feedback! Email us atfeedback@slack.com.

我们希望您的问题和反馈! 给我们发电子邮件 feedback@slack.com

翻译自: https://medium.com/slack-developer-blog/a-new-design-approach-6361bd546b7

一款新的id怎么来设计结构