elsa-workflows / elsa-workflows/elsa-core

Workflow Templates

Open
#463 2 comments 1 reaction 0 assignees View on GitHub
enhancement triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

Workflow Templates allows a given workflow to be placed inside a workflow template, similar to the way a Blazor component template allows a component to have one or more templated properties (render fragments) or a layout Razor page allows sections to be defined.

This enables scenarios where you want to allow for the customization of a part of a workflow that fits neatly within an outer workflow.

This is similar to having a master workflow calling into a child workflow, but inversed: the child workflow declares its parent (template) workflow, and is synthesized at runtime.

**Workflow Template**

A workflow template is a regular workflow, but marked as being a template so that:

* They are never triggered
* They can be selected from dashboard applications when creating child workflows.

**Workflow Sections**

When designing a workflow template, a special kind of activity called `WorkflowSection` becomes available acting as the placeholder for the "child" workflow to be stitched into. Workflow Templates can have multiple, named, sections. Each section's name appears on a child workflow as a starting node (as if the child workflow's root activities are connected to the parent workflows outcomes, where each outcome has the same name as the master workflow's sections).

**Workflow Synthesis**

Where normally a parent workflow would trigger a child workflow, workflow synthesis works differently: it takes the master workflow and child workflow and stitches them together by replacing the section activities with the root activities from the child workflow, forming a brand new workflow ready for execution.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.