Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding wf documentation regarding progress #41

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/workflows/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sidebar_position: 1
# Workflows

[[API Docs](/api/workflow-execution)]
[[SDK](https://www.npmjs.com/package/@epilot/workflow-client)]


:::note
This article is missing content (TODO)
Expand Down
1 change: 1 addition & 0 deletions docs/workflows/workflow-data-on-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sidebar_position: 2
# Workflow data on entities

[[API Docs](/api/workflow-execution)]
[[SDK](https://www.npmjs.com/package/@epilot/workflow-client)]


## Workflow data structure
Expand Down
2 changes: 2 additions & 0 deletions docs/workflows/workflow-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ sidebar_position: 3

# Workflow Notes

[[API Docs](/api/workflow-execution)]
[[SDK](https://www.npmjs.com/package/@epilot/workflow-client)]
[[Notes Docs](https://docs.api.dev.epilot.io/discussion)]


Expand Down
73 changes: 73 additions & 0 deletions docs/workflows/workflows-in-progress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: Workflow in progress
sidebar_position: 4
---

# Workflow in progress

[[API Docs](/api/workflow-execution)]
[[SDK](https://www.npmjs.com/package/@epilot/workflow-client)]

Workflows consist of two primary components, and their advancement can be interpreted in various ways depending on specific factors.

Workflows components:
- Task
- Phase

## Tasks
A task represents an individual unit of work.


![workflow task](../../static/img/workflows/task.png)

## Phases
Phases are another integral part of workflows, with the distinction that phases can encompass tasks.


![workflow phase](../../static/img/workflows/phase.png)

## Progression Tracking
The progression within a workflow is visualized through the combined use of tasks, phases, and the status field.

## Status
The status fields, used to indicate the state of the workflow and its components, are as follows:
- workflows status: `STARTED`, `CANCELLED`, `DONE`
- task status: `ASSIGNED`, `UNASSIGNED`, `IN_PROGRESS`, `SKIPPED`, `DONE`
- phase status: `OPEN`, `IN_PROGRESS`, `COMPLETED`

### Phase status logic
- `OPEN`
- contains at least 1 `OPEN` and none `IN_PROGRESS`/`DONE`/`SKIPPED` tasks
- `IN_PROGRESS`
- the first phase of a started workflow
- contains at least 1 `IN_PROGRESS` task
- contains at least 1 `DONE`/`SKIPPED` task BUT not all tasks are `DONE`/`SKIPPED` (implying work has started on the phase)
- considering linear workflows, a phase which follows a `COMPLETED` phase/task AND contains the NEXT_OPEN_TASK
- `COMPLETED`
- all tasks `DONE` or `SKIPPED`

> ⚠️ Statuses play a crucial role when data is presented based on them.
One approach to monitoring workflow progress is by tallying and considering phases in the IN_PROGRESS state.
![workflow phases in progress](../../static/img/workflows/phases_in_progress.png)


---



## Current Workflow Position
Another valuable tool for monitoring workflow progression is the concept of the `current task` and `current phase`.
- `current task`

In a sequential workflow, the current task is always the first task that falls into one of the following states: `ASSIGNED`, `UNASSIGNED`, `IN_PROGRESS` when viewing the workflow from top to bottom, regardless of whether the task is at the root level or a child of a phase.
![workflow current task](../../static/img/workflows/current_task.png)
The current task is identifiable by a blue border when viewing a workflow.

- `current phase`

Similar to the `current task`, the `current phase` is represented by a phase that contains the `current task` as one of its children. In the image below, "Prüfung" is the `current phase`.
![workflow current phase](../../static/img/workflows/current_phase.png)

> ⚠️ The present positions of tasks and phases within the workflow are employed when updating entity attributes. Workflow configurations can enable the updating of entity attributes directly from the workflow hub, as illustrated in the image below:
![workflow configure entity update](../../static/img/workflows/configure_entity_update.png)
![workflow entity attribute updated](../../static/img/workflows/entity_attribute_updated.png)
Binary file added static/img/workflows/configure_entity_update.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/workflows/curren_task.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/workflows/current_phase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/workflows/phase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/workflows/phases_in_progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/workflows/task.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.