# Multi-Workflow Engine

## 1. Purpose

* Share document references between independent policies/instances using global topics.
* Let other policies listen to those topics and process incoming references in their own branches.
* Keep processing predictable: only events that match configured type/schema/filters are routed and executed.

## 2. Location

### **Admin setup (Policy Configurator)**

Where to add the blocks

* Open Policy Configurator
* Add Global Events Writer and Global Events Reader to the policy flow

<figure><img src="/files/Od1nPyit60pax4Mkb2J6" alt=""><figcaption></figcaption></figure>

Get complete information about the blocks: [Global Events Writer Block](/guardian-dev/guardian/standard-registry/policies/policy-creation/introduction/global-events-writer-block.md) and [Global Events Reader Block](/guardian-dev/guardian/standard-registry/policies/policy-creation/introduction/global-events-reader-block.md)

### 3. Publish policy

* Reader/Writer do not work in Dry Run (block UI/pages are not shown and logic is not executed)
* Publish the policy so configuration is applied in a real run.

### 4. User setup (during policy execution)

#### **Streams management (Writer/Reader)**

* In the running policy UI, open the Reader/Writer block page (streams/topics management)
* User can:
  * Add a global topic
  * Create a global topic
  * Toggle Active ON/OFF
    * ON = Writer publishes / Reader reads & processes
    * OFF = Writer skips / Reader ignores
  * Delete a topic/stream

#### **Streams management (Writer)**

* Document type by topic

<figure><img src="/files/1ccUO9P8p1wA8MtJtVyN" alt=""><figcaption></figcaption></figure>

#### **Streams management (Reader)**

* User can set filter fields/values for a topic
* Filters are applied only if:
  * document type is VC
  * Admin configured a schema for the target branch

<figure><img src="/files/fpO6WluHTeowmXWew7gG" alt=""><figcaption></figcaption></figure>

#### **Branch execution rule (Reader)**

* A branch is executed only if the incoming event passes all checks:
  * document type matches (if configured)
  * schema validation passes (if configured)
  * field filters match (only if enabled and applicable)

<figure><img src="/files/Y4W3m7uJDcuERKJLn4V7" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guardian.hedera.com/guardian-dev/guardian/standard-registry/policies/multi-workflow-engine.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
