---
title: "Applying a Comala workflow to pages in a target space"
canonical: "https://support.appfire.com/space/CPCL/647004717/Applying%20a%20Comala%20workflow%20to%20pages%20in%20a%20target%20space"
format: markdown
---
> Macro (aura-html)


##  <span style="color: #172b4d">Overview</span>

A Comala workflow can be added to pages in a space configured as a target space for publishing.

<span style="color: #172b4d">Publishing a page to the target space creates a new page version in the target space.</span>

> 📝 The publishing action does not include any properties from a workflow applied to the source space content.

When a Comala workflow is enabled and applied as a space workflow for all the pages in a target space

| **Publishing a page for the first time** | The page in the target space is set to the initial workflow state of the applied workflow on the target space page |
| --- | --- |
| **Publishing a previously published page** | If the current state of the workflow on the target space page ***includes*** an **Updated** transition<br>- The workflow state on the target space page *changes to the destination state* for the configured **Updated** transition |
| If the workflow state on the target space page ***does not include*** an **Updated** transition<br>- The workflow state on the target space page *does not change* |

## Publishing sync state and workflow state

The publishing state for a published page ***does not change*** when the following workflow events occur on the target space page with the applied workflow:

- Changes workflow state (unless this is as a result of an **Updated** transition)
- Reviewers are assigned or unassigned to an approval
- Reviewers approve or reject the page
- Workflow state due date expires or is changed by a user

<span style="color: #172b4d">P</span>ublishing a page does not remove document activity on the target space page.

> 📝 When a Comala workflow is applied to the target space, you might need to disable the [copying of content properties](https://appfire.atlassian.net/wiki/spaces/CPCL/pages/646775243) in the [source space publishing dashboard](https://appfire.atlassian.net/wiki/spaces/CPCL/pages/646644089).

## Example - target space page workflow and sync status behavior

For example, we have a source space **A** that publishes to an empty target space **B**.

Space **B** - the target space

- has a workflow applied (this can be a workflow from any of the three Comala Document Management family of apps)

The following custom workflow (created in Comala Document Management) is active for the space.

![image](media://0ec4905b-d3d0-413c-ac89-dfaaba977ef6)

When publishing a page from source space **A** to target space **B**:

- We initialize the workflow state of the target page to the initial state of the workflow applied to that target page

For each subsequent publishing of a source page:

- The target page's workflow state remains as it was when first published unless the workflow state at the time of the publishing action has an **Updated** transition.

In our example workflow, the **Review** state and the **Approved** state each have an **Updated** transition.

## Changes in the target space page applied workflow state and page publishing status

| **Example actions** | **Publishing state** | **Example target space page workflow activity** |
| --- | --- | --- |
| A new page is created in source space **A,** named **Page**<br>The page is then published to target space **B.** | **Publishing state**<br>Newly created page<br>- Publishing state is **New**<br>On publishing and syncing the page<br>- Publishing state is set as **Synced** in both the source space page and the newly published target space page | **Target space page workflow state**<br>On publishing and syncing the page:<br>- Workflow state of the newly created target **Page** in space **B** is set to the initial state of the workflow applied to the target space page<br>In our example, the **Draft **state<br>![image](media://26ab5884-f25e-4415-9711-c5d62ddb6d02) |
| Target space page **Page** in target space **B** is submitted for review to workflow state **Review** | **Publishing state**<br>- Publishing state does not change (in our example, it remains **Synced** in both spaces) [No Change] | **Target space page workflow state**<br>- Workflow state of the target space page **Page** is transitioned to **Review** [ChangeD]<br>![image](media://668a791a-a981-4f07-9d7f-e022f6714a5e) |
| Page in target space **B** in workflow state **Review** is approved by one assigned reviewer (out of three assignees) | **Publishing state**<br>- Publishing state does not change (in our example, status **Synced** in both spaces) [No Change] | **Target space page workflow state**<br>- Workflow state of the target space page is **Review,** but the workflow state dialog box includes one reviewer with an approval done mark appended [Changed] |
| Edit source space page **Page** in space **A** | **Publishing state**<br>- Publishing state is moved to **Out of sync** in both spaces [changed] | **Target space page workflow state**<br>- Workflow state of the target space **Page** remains in the **Review** state with one approval checkmark [No Change]<br>> ℹ️ Changes in the publishing state do not affect the workflow unless there is a page update on the target space page, for example, publishing a page from the source space. |
| **Page** in target space **B** in workflow state **Review** is approved by all assigned reviewers | **Publishing state**<br>- Publishing state does not change (in our example, it is **Out of sync** in both spaces as the source page was previously edited but not published) [No Change] | **Target space page workflow state**<br>- Workflow state of target space **Page** transitions from **Review** state to **Approved** state [changed] |
| Edit target space page **Page** in space **B** in **Approved** state | **Publishing state**<br>- Publishing state is changed - moved to **Out of sync **(if not already in this status) in both spaces [changed] | **Target space page workflow state**<br>- **Updated** transition in the workflow state at the time of publishing transitions workflow - in our example, the workflow state of the target space **Page** transitions from the **Approved** to the **Draft** state [changed] |
| Publish source space page **Page** from space **A **to target space** B** | **Publishing state**<br>- Publishing state changes to **Synced** in both spaces [changed] | **Target space page workflow state**<br>- Workflow state of the target space **Page** does not change - in our example, it remains in the **Draft **state** **[No change]<br>> ℹ️ Publishing is recognized as a page update in the target space, but the workflow does not have an **updated** transition in the **draft** state. |
| Target space page **Page** in target space **B** is submitted for review again to workflow state **Review** | **Publishing status**<br>- publishing state does not change (in our example, it remains **Synced**) in both spaces [No change] | **Target space page workflow state**<br>- Workflow state of the target space **Page** transitions to the **Review **state** **[changed] |
| Edit source space page **Page** in space **A** | **Publishing state**<br>- publishing state changes to **Out of Sync** in both spaces [changed] | **Target space page workflow state**<br>- Workflow state of the target space **Page** does not change - in our example, it remains in the **Review **state** **[No change] |
| Publish source space page **Page** from space **A **to target space** B** | **Publishing state**<br>- Publishing state changes to **Synced** in both spaces [changed] | **Target space page workflow state**<br>- **Updated** transition in the state at the time of publishing transitions the applied workflow - in our example, the workflow state of the target space **Page** transitions from **Review** to **Draft** [changed]<br>> ℹ️ Publishing is recognized as a page update in the target space. The workflow has an **Updated** transition in the **Review** state that listens to this event and transitions the workflow. |

Publishing the source space page only causes a change in the workflow applied to a target space page when the current applied workflow state includes an **Updated** transition. 

In our example above, only the **Review** state and the **Approved** state have an **Updated** transition.

> 📝 A Comala workflow can be applied in the source space. It can be used together with Comala Publishing to publish pages using a workflow event, either on the transition to the final state or on a workflow trigger event. Whole-space publishing can also be configured to publish pages in the workflow’s final state, and those have a publishing state that is not yet synced.

## Related pages

> Macro (contentbylabel)