Skip to content
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: 1 addition & 1 deletion docs/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Tutorials are grouped by the area of CCF they cover:
- **Evidence and Catalog:** collect your first evidence and build the catalogs, profiles and filters that turn evidence into compliance answers. Start with [Work with evidence in the UI](./evidence.mdx), which creates evidence by hand, reads its page, finds it again and re-submits it. See [Concepts](../concepts.md#catalog) for how these pieces fit together.
- **System:** register a system, select the profiles it attests to, record its control implementation and link evidence to it.
- **Risk:** create risks, plan and track mitigations, manage the risk lifecycle and read the risk dashboard.
- **Workflows:** create and share workflow definitions, execute instances and drive them to a done or failed state.
- **[Workflows](./workflows.mdx):** create and share workflow definitions, execute instances and drive them to a done or failed state.
- **Plugins:** install CCF locally, add a plugin to your CCF Agent and see the evidence it captures.

If you are new to CCF, start with the [Introduction](../introduction/index.md) and the [glossary](../glossary.md), which define the terms these tutorials use.
145 changes: 145 additions & 0 deletions docs/tutorials/workflows.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
sidebar_label: Workflows
description: Create a workflow definition, run an instance against a system, complete its steps with evidence, and find that evidence again.
---

import StartDemoEnvironment from './_start-demo-environment.mdx';

# Run a workflow from definition to evidence

*Takes 10–15 minutes.* This tutorial walks you through everything you do with workflows in the CCF UI: build a **definition**, run an instance against one system, complete its steps with evidence, and find the evidence it produced. It's for compliance and GRC users working in the UI.

A workflow has three pieces:

- A **definition** is the template: its steps and the role that does each one.
- An **instance** runs a definition for one system on a cadence.
- An **execution** is one run of an instance, with a task per step.

## Before you start

You work in the current release of the UI. You need access to **Integrations** → **Workflow Definitions**, to create definitions and their steps, and to **This System** → **Workflow Instances**, to run them. Do the Systems tutorial first if you haven't registered a system yet; the [Tutorials overview](./index.md) lists it.

<Steps>
<Step title="Start the demo environment">

<StartDemoEnvironment />

</Step>

<Step title="Have an active system">

Workflow instances belong to the system picked in the header's **Active System:** switcher. If the switcher shows no system, select **+ New system**, give the new system a **Title** and select **Create System Security Plan**. The [Systems tutorial](./index.md) covers describing a system in full; here you only need one to hold your instance.

<Checkpoint src="/img/tutorials/workflows/active-system.png" alt="The CCF UI header with the Active System: switcher showing a selected system">

The header's **Active System:** switcher names your system. **Workflow Instances** is now available under **This System**.

</Checkpoint>

</Step>

<Step title="Create a definition">

Under **Integrations**, go to **Workflow Definitions** and select **New Definition**. In **Create Workflow Definition**, fill in **Name**, **Description** and **Suggested Cadence**, then select **Create Definition**. The definition opens in the editor. The UI has no control to publish a definition, so it stays **Draft** — you can still run it. The editor's **Controls** tab links the definition to catalog controls, but it only aids discovery and you don't need it here.

<Checkpoint src="/img/tutorials/workflows/definition-created.png" alt="The Workflow Definitions page listing a new definition with status Draft">

Your definition appears in the **Workflow Definitions** list with status **Draft**, and the editor opens on it.

</Checkpoint>

</Step>

<Step title="Add its steps">

On the **Steps** tab, select **Add Step**. Give the step a **Step Name** and a **Responsible Role**. The role is free text, for example `Security Officer`, and it is what people are assigned to later. Tick **Evidence Required** and select **Add Evidence** to require a document, then select **Create Step**.

Add a second step that lists the first under **Dependencies**: open **Add Step** again, give it a **Step Name** and a **Responsible Role**, and pick the first step from the **Dependencies** list. The step graph above the list now shows the dependency.

<Checkpoint src="/img/tutorials/workflows/definition-steps.png" alt="The Steps tab of a workflow definition showing two steps and a step graph above the list">

The **Steps** tab lists both steps. One carries an **Evidence Required** badge, the second lists its dependency, and the graph above the list joins the two.

</Checkpoint>

</Step>

<Step title="Create an instance">

Under **This System**, go to **Workflow Instances** and select **New Instance**. In **Create Workflow Instance**, pick the **Workflow Definition** you created, keep or change the **Instance Name**, choose an **Execution Cadence** (keep the default **Monthly** — you run the instance by hand in the next step), and select **Create Instance**. You can create an instance from a **Draft** definition.

<Checkpoint src="/img/tutorials/workflows/instance-created.png" alt="The Workflow Instances page listing a new instance for the active system">

Your instance appears in the **Workflow Instances** list, tied to the active system.

</Checkpoint>

</Step>

<Step title="Share it by assigning the roles">

This is how a workflow is shared. On the instance's **Role Assignments** tab, select **Assign Role**. In **Assign Roles**, pick a user for each role (yourself, for this tutorial) and select **Assign Selected Roles**.

Only users who hold a step's role on the instance can work that step; the API checks it when they start or complete it. You assign a role to a user here.

<Checkpoint src="/img/tutorials/workflows/role-assignments.png" alt="The Role Assignments tab of a workflow instance showing a user assigned to each step role">

The **Role Assignments** tab lists each step role with the user you assigned to it.

</Checkpoint>

</Step>

<Step title="Run it and complete the steps">

Select **Execute Now**, then confirm with **Start Execution**. The execution page opens with a task for each step.

Open the first step with **View Details** and select **Start Step**. Add the required document with **Add Evidence** — the UI holds it and submits it when you complete the step. Add **Completion Notes (Optional)** and select **Complete Step**. The second step is no longer blocked by the first. Open it with **View Details**, select **Start Step**, add its evidence and select **Complete Step**.

<Checkpoint src="/img/tutorials/workflows/execution-completed.png" alt="A workflow execution page showing both steps completed">

Both steps show as completed on the execution page, and the run has produced the evidence you submitted.

</Checkpoint>

</Step>

<Step title="When things don't go to plan">

A step or a run can end other ways. On a step, **Mark Failed** opens a **Failure Reason** field and asks you to confirm; a failed run offers **Retry Execution** to run it again. **Reassign Task** hands a step to another user. On a run in progress, **Cancel Execution** first asks for a reason in a browser prompt, then a confirmation dialog. People find the steps assigned to them under **My Tasks**, in the profile menu. These are covered in their own tutorial.

</Step>

<Step title="See the evidence">

On a completed run, select **View Evidence Stream** to see the evidence it produced. From an evidence record, select **Back to Execution** to return to the run.

That evidence is ordinary evidence, so an evidence filter on its labels can link it to a control, the same way the Systems tutorial links evidence to a control.

<Checkpoint src="/img/tutorials/workflows/evidence-stream.png" alt="The Evidence History page for a finished workflow execution, listing the run's step events with a View link to each record">

The evidence stream lists the run's steps and the evidence they produced. **Back to Execution** on a record returns you to the run.

</Checkpoint>

</Step>
</Steps>

## Check your work

Open the finished execution and check that both steps are completed and that **View Evidence Stream** lists the document you submitted for the first step. The instance under **This System** → **Workflow Instances** shows the run, and its **Role Assignments** tab shows who can work each step.

## Next steps

<CardGroup cols={2}>
<Card title="Tutorials overview" icon="🧭" href="/tutorials">

The tutorial groups, and the Systems and Filter tutorials this one builds on.

</Card>
<Card title="Introduction" href="/introduction">

What the Continuous Compliance Framework (CCF) does, for readers new to it.

</Card>
</CardGroup>
2 changes: 1 addition & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const sidebars = {

// Curated by hand; the navbar "Tutorials" item links to this sidebar
// (see the docSidebar item in docusaurus.config.ts).
tutorialsSidebar: ['tutorials/index', 'tutorials/evidence', 'tutorials/components'],
tutorialsSidebar: ['tutorials/index', 'tutorials/evidence', 'tutorials/components', 'tutorials/workflows'],
};

module.exports = sidebars;
Binary file added static/img/tutorials/workflows/active-system.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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading