---
title: "Implement parallel optional approvals in a workflow"
canonical: "https://support.appfire.com/space/SUPPORT/553353226/Implement%20parallel%20optional%20approvals%20in%20a%20workflow"
format: markdown
---
> ℹ️ This workaround is for Server/Data Center version of Comala Document Management

Sometimes it could be needed to have a parallel approval to be optional apart from the required one so in case any user has been assigned to the optional approval before the required approval is completed, it will be needed to undertake it for the content to be transitioned.

See an example workflow markup below:

<details>
<summary>click to expand</summary>

```
{workflow:name=Simple approval workflow|key=spaceworkflow-2069888558}
    {description}
        The Simple Approval Workflow has 2 states.
        In Progress: Staff edit pages, not visible to non-team members. Approved: Staff approve, visible to public.
    {description}
    {workflowparameter:Optional_Reviewers|type=user|edit=true}
        
    {workflowparameter}
    {state:In Progress|approved=Approved|taskable=true|colour=#ffab00}
        {approval:Mandatory Review|assignable=true}
        {approval:Optional Review|selectedapprovers=@Optional_Reviewers@}
    {state}
    {state:Approved|final=true|updated=In Progress|hideselection=true}
    {state}
    {trigger:pageapproved|approval=Mandatory Review|@Optional Review>approvalassignees@=@Empty@}
        {set-state:Approved}
    {trigger}
{workflow}
```
</details>

In the markup above there are 2 [approvals](https://docs.comalatech.com/space/CDML/13977944082/approval+macro) in the `In Progress` [state](https://docs.comalatech.com/space/CDML/6833112099). The second one is set with a [workflow parameter](https://docs.comalatech.com/space/CDML/6753945016) type user called `@Optional Reviewers@` so that's the approval that will not be mandatory to be carried through for the content to be [transitioned](https://docs.comalatech.com/space/CDML/6832751537) to the `Approved` state but only the first approval. 

As you see, there is a [trigger](https://docs.comalatech.com/space/CDML/6832751876) which is listening to when the mandatory approval (called `Review`) is approved and, if there is no [reviewer assigned](https://docs.comalatech.com/space/CDML/6833603579/Approvals#Assignable-review) to the optional approval (called `Optional Review`), content will be transitioned to `Approved` state.

On the other hand, if `Optional Review` had any assigned reviewer in the moment `Review` approval is approved, content won’t be transitioned until the `Optional Review` approval is done.

## Multiple required approvals

In case there are more than one required approval, you can use `hasapproval` condition and add as many triggers as are comparisons needed:

<details>
<summary>click to expand</summary>

```
{workflow:name=Simple approval workflow|key=spaceworkflow-2069888558}
    {description}
        The Simple Approval Workflow has 2 states.
        In Progress: Staff edit pages, not visible to non-team members. Approved: Staff approve, visible to public.
    {description}
    {workflowparameter:Optional_Reviewers|type=user|edit=true}
        
    {workflowparameter}
    {state:In Progress|approved=Approved|taskable=true|colour=#ffab00}
        {approval:Mandatory Review 1|assignable=true}
        {approval:Mandatory Review 2|assignable=true}
        {approval:Mandatory Review 3|assignable=true}
        {approval:Optional Review|selectedapprovers=@Optional_Reviewers@}
    {state}
    {state:Approved|final=true|updated=In Progress|hideselection=true}
    {state}
    {trigger:pageapproved|approval=Mandatory Review 1|hasapproval=Mandatory Review 2|hasapproval=Mandatory Review 3|@Optional Review>approvalassignees@=@Empty@}
        {set-state:Approved}
    {trigger}
    {trigger:pageapproved|approval=Mandatory Review 2|hasapproval=Mandatory Review 1|hasapproval=Mandatory Review 3|@Optional Review>approvalassignees@=@Empty@}
        {set-state:Approved}
    {trigger}
    {trigger:pageapproved|approval=Mandatory Review 3|hasapproval=Mandatory Review 1|hasapproval=Mandatory Review 2|@Optional Review>approvalassignees@=@Empty@}
        {set-state:Approved}
    {trigger}
{workflow}
```
</details>