- 发行说明
- 入门指南
- 设置和配置
- 自动化项目
- 依赖项
- 工作流类型
- 文件比较
- 自动化最佳实践
- 源代码控件集成
- 调试
- 诊断工具
- 工作流分析器
- 变量
- 参数
- 导入的命名空间
- 控制流程
- 对象存储库
- 日志记录
- ScreenScrapeJavaSupport 工具
- Studio 测试
- 扩展程序
- 故障排除
Use workflow templates as base models for other workflows. You can use built-in templates (e.g. Sequences, Global Exception Handler, create custom templates, or use templates from libraries installed in your projects.
条件:
- 模板特定于项目类型和语言。
- 文件模板无法转换为工作流,也无法进行编译或发布。
- 您可以创建基于其他模板的模板。
模板来源
When you add a new workflow to a project, you can choose a template on which to base it. The templates that you can choose from vary depending on the type of file you are adding (workflow or test case), whether you've installed libraries that contain file templates, and whether you've previously added templates to your project Templates folder.
内置文件模板
序列
The Sequence template is useful if you want to design a workflow with sequential activities that act as a single block. This template is available only for workflows.
流程图
Use the Flowchart template to design workflows with multiple branches. This template is available only for workflows.
状态机
Use the State machine template to design workflows with activities that get triggered based on specified states. This template is available only for workflows.
本地文件模板
Local templates are created in the Templates folder of the project when you extract a file as template and when you add a template to the Templates folder. Local file templates are available inside the project where you create them. Local templates added in a library project will be available in projects where the library is installed as a dependency.
You can create local templates of three types: execution template, workflow template, and test case template. When you extract a file as a template, the template type is applied automatically based on the type of file you extract (workflow or test case). When you manually add a template to the Templates folder, you select the type of template to create.
包文件模板
包文件模板是包含在库或活动包中的文件模板,这些包作为依赖项安装在项目中。
When you create a workflow, you can find workflow templates from installed libraries under Package file templates in the Template dropdown.
添加本地文件模板
You can use the contextual menu in the Project panel to manually add workflow, execution, and test case templates based on other templates to your project. After you add a template, you can edit it in the Designer, and then use it as a starting point for creating other files.
To add a workflow template, right-click the Templates folder, and then select Add > Workflow Template. You can then select a template on which to base the new template.
将文件提取为模板
如果要将现有工作流作为未来文件的模板提供,请将其提取为模板。
In the Project panel, right-click a workflow, and then select Extract as Template.
The extracted file is added to the Templates folder. The following image shows a workflow template created from a sequence and two test case templates.
库中的工作流模板
You can create workflow templates in libraries the same way you create them in processes. After you publish the library, the templates marked as public are available as package file templates in projects where the library is installed.
根据模板创建工作流
-
创建空白流程。
-
构建要用作模板的任何工作流。在此示例中,示例工作流将创建一个表单(受访者可在其中提供其全名和年龄),然后输出受访者在表单中填写的年龄。
-
When you finish building the workflow, right-click it, and select Extract as Template.
Name the template, choose the Templates folder as the location to store it in, and select Create. For this example, the name of the template is MyFirstLocalTemplate.
-
Go to the Design tab, in the File group, select New > Workflow. The New Workflow window is displayed.
-
Give it an appropriate name and choose the location as the Templates folder, and select the template that you previously created from the Template dropdown list. For this example, choose MyFirstLocalTemplate.
Example: Check out the sample XAML project below.
Download example_Sample.zip)
删除模板
To remove a template, expand the Templates folder in the Project panel, right-click the template, and then select Delete.