# Demo using UI

## 1. Document reviews

### 1.1 Overview

To enable document reviews within a policy, a corresponding button must be made available in the grid. (This button is combined with the document view function.)

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

This button will appear in the grid for documents, showing a number of existing comments for each of them.

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

### 1.2 Discussions

When opening a comments section a list of discussions is displayed. To create a comment, users must either select an existing discussion or create a new one.

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

#### 1.2.1 Creating a Discussion

To create a discussion several fields must be filled out:

**Discussion name** - arbitrary human readable name (usually used for indicating the topic of the discussion).

**Relationships** – references to other documents related to the current one.

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

Selecting document in the ‘relationships’ will cause the discussion to be shown when viewing them as well.

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

You can also link a discussion to a specific field in the document by adding a field reference.

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

1. **Visibility Scope**\
   The visibility scope determines who can see a given discussion.

a. **Public** – all users who have access to the document

<figure><img src="/files/0xTbcXdhmOtiZXFFTO8E" alt=""><figcaption></figcaption></figure>

b. **Roles** – users with specific roles (and the creator of the discussion)

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

c. **Users** – only specified users (and the creator of the discussion)

<figure><img src="/files/11Tt1wApQx8vPaRC2REc" alt=""><figcaption></figcaption></figure>

#### 1.2.2 Viewing

You can search for the desired discussion using a **search** function.

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

Also it is possible to search (filter) discussions based on their field links

<figure><img src="/files/7zF8YgkR9zUuLuff9a0P" alt=""><figcaption></figcaption></figure>

The list of discussion participants can be viewed inside each discussion.

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

### 1.3 Messages

#### 1.3.1 User mentions

Users can be mentioned in messages using @username notation.

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

#### 1.3.2 Field References

Fields in a document can be referenced in messages using #fieldname notation.

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

Fields in a document can be referenced in messages also using the link button. 

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

#### 1.3.3 Attachments

Files can be attached to messages.

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

Files, as well as messages, are encrypted and stored in IPFS.

Hedera Topics contain messages with meta-information and links to the corresponding document and attached files.

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

## 2. Document Revisions

### 2.1 Configuration

To allow document revision, a corresponding button (requestVcDocumentBlock) must be added. To configure requestVcDocumentBlock to enable editing, the operation type must be set to Edit.

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

### 2.2 Events

As with creating a new document, editing a document revision triggers a standard event that saves a new version of the document.

<figure><img src="/files/64NceH2sDddpgGnGRczw" alt=""><figcaption></figcaption></figure>

The old revision of the document is automatically marked as outdated. To hide ‘outdated’ revisions of the documents from the grid, enable “Hide previous versions.”  

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

## 3. Access control

Since discussions are published encrypted, keys are required to access (e.g. for audits) their content - comments and attached documents.

### 3.1 Guardian user Permissions

To enable access to all policy artifacts, audit permission in the policy configuration must be assigned to the corresponding user/role.

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

### 3.2 Documents

Audit permission allows access to all documents within the policy.

<figure><img src="/files/40mrGSIR5Db3VxwRKS39" alt=""><figcaption></figcaption></figure>

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

#### 3.3 Encryption keys

Audit permission grants access to discussion encryption keys. These keys make it possible to decrypt messages within discussions for verification purposes.

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

## 4. Indexer view

Because discussion content is published encrypted, to view their content Indexer users need to provide the corresponding encryption keys.

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

When provided, keys are never stored. They are used solely within the current user session to decrypt messages encrypted with the corresponding key, which are automatically identified by the Indexer. 

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

<figure><img src="/files/hwWiMgpcRz1xLRJBsp10" 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/complex-iterative-review-and-approval-workflows/demo-using-ui.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.
