> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/release-orchestration/use-release-orchestration/release-orchestration-processes/process-modeling.md).

# Process Modeling

Learn how to model release processes using phases, activities, and dependencies.

Process modeling in Release Orchestration allows you to define your release workflows using phases, activities, dependencies, and variables. You can create processes using AI-based generation or manual configuration to match your team's specific requirements.

### Create a process with AI <a href="#ai-based-process-creation" id="ai-based-process-creation"></a>

Harness supports creation of processes using Harness AI. Most of the time, release processes are available in a textual fashion, documented in different sources. Release Orchestration enables users to provide that process documentation and create the process as an entity in Harness Release Orchestration.

To create a process with Harness AI, navigate to **Processes**, then click **Create Process**.

<figure><img src="https://478177610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwRDYqBolZUj6Rwnqx0mm%2Fuploads%2Fgit-blob-7121adfa7c5ea78472a677b2ed7f021fcff98088%2Fcreate-process-ai.png?alt=media" alt=""><figcaption><p>Click to view full size image</p></figcaption></figure>

Enter instructions that define your release process. Use the following example:

**Example prompt:**

```
Create a multi-service release process starting from release planning and coordination up until monitoring in production. The process includes the following phases:
- Release planning and coordination (Owner: Release Manager)
- Build and artifact creation
- Testing and validation
- Feature flag enablement
- Production deployment
- Monitoring and rollback
```

After you submit the prompt, Harness AI performs the following actions:

* **Creates phases:** Identifies logical groups of activities as phases.
* **Assigns owners:** Assigns owners from the prompt or asks you to provide them.
* **Creates activities:** Generates activities within each phase.
* **Infers dependencies:** Determines execution order and dependencies.

<figure><img src="https://478177610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwRDYqBolZUj6Rwnqx0mm%2Fuploads%2Fgit-blob-68013e1ebd331013ff53b0e931666ea50b1a9cfe%2Fharness-ai-process-creation.png?alt=media" alt=""><figcaption><p>Click to view full size image</p></figcaption></figure>

Harness AI asks you to provide owners for each phase. After you select owners, Harness AI creates YAML for the release process. The YAML appears as a step-by-step release process.

<figure><img src="https://478177610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwRDYqBolZUj6Rwnqx0mm%2Fuploads%2Fgit-blob-af3b410e65245847ab8c3db4f2fc757907004b13%2Fharness-ai-process-created.png?alt=media" alt=""><figcaption><p>Click to view full size image</p></figcaption></figure>

You can define phases, activities, and dependencies manually to match your release process. Use Harness AI when you want to generate a starting process.

### Process structure <a href="#process-structure" id="process-structure"></a>

#### Basic structure <a href="#basic-structure" id="basic-structure"></a>

A process has the following elements:

1. **Metadata**: Name and description
2. **Inputs**: Required parameters (captured using an Input Store when executing)
3. **Variables**: Process-wide variables
4. **Phases**: Major stages
5. **Activities**: Tasks within phases
6. **Dependencies**: Execution order rules

#### YAML example <a href="#example-yaml" id="example-yaml"></a>

The following example uses the same YAML shape as a real process created in Release Orchestration (nested `phase` and `activity` blocks, `depends-on`, `owners`, and optional `if` and `data` fields).

```yaml
process:
  name: Comprehensive Release Process
  description: A structured release process covering build, test, and deployment phases
  id: comprehensive_release_process
  phases:
    - phase:
        id: build_phase
        name: Build Phase
        description: Build and validate artifacts before testing.
        owners:
          - Development Team
        depends-on: []
        activities:
          - activity: AutoPipe
            id: AutoPipe
            name: AutoPipe90
            description: ""
            depends-on: []
          - activity: AutoPipe
            id: AutoPipe12
            name: AutoPipe12
            description: ""
            depends-on:
              - AutoPipe
          - activity: AutoPipe
            id: TestActivity00
            name: TestActivity00
            description: ""
            depends-on:
              - AutoPipe12
            if: <+90>
          - activity: ManualTest
            id: AutoIioo
            name: Auto_deploy
            description: doc
            depends-on:
              - AutoPipe12
    - phase:
        id: test_phase
        name: Test Phase
        description: Execute tests and quality gates before deployment.
        owners:
          - QA Team
        depends-on:
          - build_phase
        activities:
          - activity: TestActivity
            id: TestActivity
            name: TestActivity
            depends-on: []
    - phase:
        id: deploy_phase
        name: Deploy to Staging1 Phase
        owners:
          - DevOps Team
        depends-on:
          - test_phase
        activities:
          - activity: WaitingActivity
            id: WaitingActivity
            name: WaitingActivity
            depends-on: []
            data:
              pipeline:
                pipeline: default/MyProject/MyPipeline
                inputSet: {}
```

### Model complex release processes <a href="#modeling-complex-release-processes" id="modeling-complex-release-processes"></a>

You can model complex release processes with different sequences of execution in terms of parallel and sequential execution.

#### Common execution patterns <a href="#common-execution-patterns" id="common-execution-patterns"></a>

**Sequential Execution**

Activities execute one after another:

```
Activity A → Activity B → Activity C
```

**Parallel Execution**

Activities execute simultaneously:

```
Activity A ─┐
            ├→ Activity D
Activity B ─┤
            └→ Activity E
Activity C ─┘
```

**Conditional Execution**

Activities execute based on conditions:

```
Activity A → [Condition] → Activity B (if true)
                      └→ Activity C (if false)
```

#### Phase Dependencies <a href="#phase-dependencies" id="phase-dependencies"></a>

Phases can have dependencies preconfigured. For example:

* The **test phase** has dependencies on the **build phase**
* The **validation phase** has dependencies on the **build phase**
* Phases execute in the order defined by their dependencies

#### Activity Dependencies <a href="#activity-dependencies" id="activity-dependencies"></a>

Activities within each phase can also have dependencies. For example:

* **Activity 3** (a manual pipeline or automated activity) and **Activity 3.1** (a manual activity) are dependent on **Activity 2** (an automated pipeline activity)
* Activities execute in the order defined by their dependencies
* Dependencies can be configured to support both parallel and sequential execution

#### Complex process structure example <a href="#example-complex-process-structure" id="example-complex-process-structure"></a>

A pre-built, preconfigured process might have:

* **Build Phase**: Contains build activities
* **Test Phase**: Depends on Build Phase, contains test activities
* **Validation Phase**: Depends on Build Phase, contains validation activities
* **Activities with dependencies**: Activities within phases that depend on other activities

With this structure, it is possible to model complex release processes and execute them using a release.

### Git-backed processes <a href="#git-backed-processes" id="git-backed-processes"></a>

For git-backed processes, Harness resolves activities based on the following rules:

#### Activity resolution rules <a href="#activity-resolution-rules" id="activity-resolution-rules"></a>

| Process Location | Activity Location      | Resolution Status  |
| ---------------- | ---------------------- | ------------------ |
| branchA          | Inline activity        | ✅ Resolves         |
| branchA          | branchA (same repo)    | ✅ Resolves         |
| branchA (repoA)  | Default branch (repoB) | ✅ Resolves         |
| branchA (repoA)  | branchB (repoA)        | ❌ Shows as Unknown |

**Key behavior:** Harness fetches activities from the same branch where the process is stored.

#### Resolution failure <a href="#resolution-failure" id="resolution-failure"></a>

Activities show as **Unknown** when the process and activity are in the same repository but different branches. The activity becomes non-editable in the UI.

**Example:**

* Process in `release-v2` branch
* Activity in `main` branch (same repository)
* Result: Activity shows as Unknown

#### Configuration options <a href="#configuration-options" id="configuration-options"></a>

Use one of the following approaches:

1. Store activities in the same branch as the process
2. Store activities in a different repository (reference from default branch)
3. Define activities inline in the process YAML

{% hint style="info" %}
Store processes and their activities in the same branch to ensure correct resolution.
{% endhint %}

### Process blueprints <a href="#process-blueprints" id="process-blueprints"></a>

Start with blueprints for common scenarios:

* Standard production release
* Hotfix release
* Multi-service release
* Scheduled release

Customize a blueprint to fit your needs.

### Related topics <a href="#related-topics" id="related-topics"></a>

* [Phases](/release-orchestration/use-release-orchestration/release-orchestration-phases/phases-overview.md)
* [Activities](/release-orchestration/use-release-orchestration/release-orchestration-activities/activities-overview.md)
* [Activity Dependencies](/release-orchestration/use-release-orchestration/release-orchestration-activities/activities-overview.md#activity-dependencies-and-execution-order)
* [Modeling complex processes](#modeling-complex-release-processes)

{% @harness-feedback/feedback %}
