# YOUSIGNCHECK

## Aperçu

L'application de workflow **YOUSIGNCHECK** vous permet de vérifier le statut d'un agrément et de télécharger son fichier associé, qui est une concaténation de fichiers joints.

## Mode de fonctionnement

* Vous pouvez vérifier le statut d'un agrément et télécharger le fichier depuis Yousign en fonction de vos critères de statut.<br>
* Des logs d'application sont disponibles. Ceux-ci peuvent être spécifiés en définissant la valeur du paramètre `YousignCheckLogLevel` dans le fichier `web.config` sur `0` pour désactiver la journalisation, `1` pour les logs d'erreur, `2` pour des logs d'informations ou `3` pour les logs de débogage; la valeur par défaut est `0`.

## Configuration de l'API Yousign

Pour configurer l'API Yousign, référez-vous à la section [Configuration de l'API Yousign](https://docs.advantys.com/workflowgen-guide-administration/applications-de-workflow/yousignsend#configuration-de-lapi-yousign) dans la section [Application de workflow YOUSIGNSEND](https://docs.advantys.com/workflowgen-guide-administration/applications-de-workflow/yousign/yousignsend).

## Paramètre requis

<table data-header-hidden><thead><tr><th valign="top">Paramètre</th><th valign="top">Type</th><th valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><strong>Paramètre</strong></td><td valign="top"><strong>Type</strong></td><td valign="top"><strong>Direction</strong></td><td valign="top"><strong>Description</strong></td></tr><tr><td valign="top"><code>YOUSIGN_SIGNATURE_ID</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">ID de la signature Yousign à vérifier</td></tr></tbody></table>

## Paramètres facultatifs

### Configuration Yousign

<table data-header-hidden><thead><tr><th valign="top">Paramètres</th><th valign="top">Type</th><th valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><strong>Paramètres</strong></td><td valign="top"><strong>Type</strong></td><td valign="top"><strong>Direction</strong></td><td valign="top"><strong>Description</strong></td></tr><tr><td valign="top"><code>YOUSIGN_API_KEY</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top">Clé d'API Yousign<br><br>Par défaut, cette valeur provient du paramètre <code>YousignApiKey</code> dans le fichier <code>web.config</code>.</td></tr><tr><td valign="top"><code>YOUSIGN_HOST_SERVER</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top"><p>Serveur hôte Yousign (p.ex. :  <code>https://api.yousign.app/v3</code>)<br></p><p>Par défaut, cette valeur provient du paramètre <code>YousignHostServer</code> dans le fichier <code>web.config</code>.</p></td></tr></tbody></table>

### Général

<table data-header-hidden><thead><tr><th valign="top">Paramètres</th><th valign="top">Type</th><th valign="top">Direction</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><strong>Paramètres</strong></td><td valign="top"><strong>Type</strong></td><td valign="top"><strong>Direction</strong></td><td valign="top"><strong>Description</strong></td></tr><tr><td valign="top"><code>VALID_STATUS_LIST</code></td><td valign="top">TEXT</td><td valign="top">IN</td><td valign="top"><p>Statut valide pour télécharger le document<br></p><p><strong>Valeurs possibles :</strong></p><ul><li><code>draft</code></li><li><code>ongoing</code></li><li><code>done</code></li><li><code>deleted</code></li><li><code>expired</code></li><li><code>canceled</code></li><li><code>approval</code></li><li><code>rejected</code></li><li><code>declined</code></li></ul><p><strong>Par défaut :</strong> <code>done,canceled,expired,deleted,rejected</code></p></td></tr><tr><td valign="top"><code>YOUSIGN_DOCUMENT</code></td><td valign="top">FILE</td><td valign="top">OUT</td><td valign="top">Document  Yousign</td></tr><tr><td valign="top"><code>YOUSIGN_STATUS</code></td><td valign="top">TEXT</td><td valign="top">OUT</td><td valign="top">Statut de l'agrément</td></tr></tbody></table>

## Exemple avec YOUSIGNSEND

Dans l'exemple suivant, l'action YOUSIGNSEND est directement suivie par l'action YOUSIGNCHECK. Cette action reviendra sur elle-même jusqu'à ce que le statut passe à `done`, `canceled`, `expired`, `deleted` ou `rejected`.

Si le statut renvoyé remplit la condition, le document sera téléchargé à partir de Yousign.

<div align="left"><figure><img src="https://content.gitbook.com/content/2LicQovnrQ214d7VFxr6/blobs/IpAKhpSmOf7V70qmKnQb/image.png" alt=""><figcaption></figcaption></figure></div>

Avec la fonction d'action de boucle système, l'action YOUSIGNCHECK sera exécutée toutes les `x` secondes jusqu'à ce que la condition OUT soit remplie.

<div align="left"><figure><img src="https://3433205032-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2LicQovnrQ214d7VFxr6%2Fuploads%2FjCNfoYLgbCN03QT3g9U8%2FYOUSIGNCHECK_edit_action.png?alt=media&#x26;token=f4ddf8e3-257e-4056-a6d9-6386f29f7566" alt=""><figcaption><p>Configuration d'une action YOUSIGNCHECK</p></figcaption></figure></div>
