# Enable PVA: Event Based Activities

With the 26R1 release, SafetyDocs automates the creation of activities for monitored obligation events. This feature allows users to create _PVA Obligations_ to monitor for specific PSMF, RMP, or signal events. When a monitored event is detected, Vault creates a series of object records to support addressing the event.

After you have enabled this feature, see the following articles for more information:
* <a href="/en/lr/01242/#automated-activity-creation">Manage Pharmacovigilance Agreements</a>
* <a href="/en/lr/928422/#automated-activity-creation">Manage PVA Multi-Agreement Activities</a>

## Prerequisites
To enable this feature, you must first enable:
* <a href="/en/lr/01324/">PVA Management</a>
* <a href="/en/lr/927259/">Multi-Agreement Activities</a>

Depending on the [events][5] for which you want to permit automated event creation, you must first enable:
* <a href="/en/lr/801756/">Risk Management</a>
* <a href="/en/lr/01307/">PSMF Automatic Logbook Generation</a>
* <a href="/en/lr/01344/">Signal Management</a>

## Overview
To enable this feature:
* [Update object layouts and fields][1]
* [Update lifecycles][5]

## Update Object Layouts and Fields {#update-layouts-fields}
Update the following objects:
* [_PV Agreement_][2]
* [_PVA Multi-Agreement Activity_][3]
* [_PVA Obligation_][4]

### Update the PV Agreement Layout {#pv-agreement-layout}
To update the _PV Agreement_ layout, <a href="/en/lr/26387/#how-to-add-object-fields">add</a> the following fields to the bottom of the _Details_ section:
* _Marketing Authorization Holder_
* _Global Safety Database Holder_

### Update the PVA Multi-Agreement Activity Object {#pva-maa-object}
To update the _PVA Multi-Agreement Activity_ layout:
1. <a href="/en/lr/26387/#save-as-layout">Copy the standard layout</a> and ensure it is <a href="/en/lr/26387/#object-type-layout">active</a>.
2. <a href="/en/lr/26387/#set-a-default-layout">Set the copied layout as the default</a>.
3. <a href="/en/lr/26387/#delete-a-layout">Delete</a> any other existing custom layouts.

Then, update the _Due Date_ field as follows:
1. Navigate to **Admin > Configuration > Objects > PVA Multi-Agreement Activity > Fields > Due Date**.
2. Select **Edit**.
3. Update the following values:
    * **Label**: Enter `Default Activity Due Date`
    * **Help Content**: Enter `Select the default calendar date that will be used as related Activity Due Dates. Vault applies this date only when the PVA Obligation's Timeline is not specified in days.`
4. Select **Save**.

### Update the PVA Obligation Object {#pva-obligation-object}
To update the _PVA Obligation_ layout:
1. <a href="/en/lr/26387/#save-as-layout">Copy the standard layout</a> and ensure it is <a href="/en/lr/26387/#object-type-layout">active</a>.
2. <a href="/en/lr/26387/#set-a-default-layout">Set the copied layout as the default</a>.
3. <a href="/en/lr/26387/#delete-a-layout">Delete</a> any other existing custom layouts.
4. Update the new layout as follows:
    * <a href="/en/lr/26387/#how-to-add-object-fields">Add</a> the _Activities Triggered by Events?_ field below the _ICSR Type_ field
    * Update the _Timeline Days_ <a href="/en/lr/51632/#creating-layout-rules">layout rule</a>. In the _Apply the following display effects_ section, add the following new display effect:
        * **Effect**: Select **Display as Required**
        * **Type**: Select **Fields**
        * **Values**: Select **Timeline Days**

Then, update the _Obligation Direction_ field as follows:
1. Navigate to **Admin > Configuration > Objects > PVA Obligation > Fields > Obligation Direction**.
2. Select **Edit**.
3. Update the following values:
    * **Help Content**: Enter `Defines whether activities are sent to, received from, or both with a partner. Vault calculates the default value based on the PV Agreement's MAH and GSDH values, and the Obligation's Responsible Party field.`
    * In the _Default Value_ section, select the **Default based on expression** checkbox, then enter the following default value expression: `If( Or( responsible_party__v = 'company__v', And( responsible_party__v = 'global_safety_database_holder__v', pv_agreement__vr.pva_gsdh__v = 'company__v' ), And( responsible_party__v = 'marketing_authorization_holder__v', pv_agreement__vr.pva_mah__v = 'company__v' ) ), Picklist.pva_distribution_type__v.outbound__v, If( Or( responsible_party__v = 'partner__v', And( responsible_party__v = 'global_safety_database_holder__v', pv_agreement__vr.pva_gsdh__v = 'partner__v' ), And( responsible_party__v = 'marketing_authorization_holder__v', pv_agreement__vr.pva_mah__v = 'partner__v' ) ), Picklist.pva_distribution_type__v.inbound__v, If( Or( responsible_party__v = 'both_parties_separately__v', responsible_party__v = 'both_parties_jointly__v' ), Picklist.pva_distribution_type__v.both__v, null ) ) )`
4. Select **Save**.

## Update Lifecycles {#update-lifecycles}
Configure the following entry actions on the relevant document and object lifecycles as required by your business processes:
* To allow monitoring of RMP events, create a document lifecycle <a href="/en/lr/12399/#create">entry action</a> on the _Approved_ state of the _General Document Lifecycle_ with the following settings:
    * **Condition Type**: Select **All conditions are met**
    * **If**: Select **Classification > equals > Risk Management > Risk Management Plan > Core RMP**
    * **perform actions**: Select **Trigger PVA Event Activity**
* To allow monitoring of PSMF events, create a document lifecycle <a href="/en/lr/12399/#create">entry action</a> on the _Final_ state of the _PSMF Generated Document Lifecycle_ with the following settings:
    * **Condition Type**: Select **All conditions are met**
    * **If**: Select **Classification > equals > Pharmacovigilance System Master File > PSMF Generated Document > PSMF Generated PDF**
    * **perform actions**: Select **Trigger PVA Event Activity**
* To allow monitoring of signal events, create an object lifecycle <a href="/en/lr/59885/#entry-actions">entry action</a> on the _Risk Mitigation_ state of the _Safety Investigation Lifecycle_ with the following settings:
    * **Condition Type**: Select **Always**
    * **perform actions**: Select **Trigger PVA Signal Event Activity**

[1]: #update-layouts-fields
[2]: #pv-agreement-layout
[3]: #pva-maa-object
[4]: #pva-obligation-object
[5]: #update-lifecycles