# Installation

## General

This document guides on installing and configuring the **Anomaly Detection Component**.

## Pre-Requisites <a href="#pre-requisites" id="pre-requisites"></a>

All the roles, connectors, and properties of the Permission Set solution must be imported before importing workflows, and is required to have prior knowledge of [Azure Anomaly Detection](https://docs.microsoft.com/en-us/azure/cognitive-services/anomaly-detector/) to Change the workflow to a specific device.&#x20;

### Systems and Versions

| System                           | Version                                                                                |
| -------------------------------- | -------------------------------------------------------------------------------------- |
| IFS Applications                 | 10                                                                                     |
| Novacura Flow Server             | 6.13                                                                                   |
| Novacura Flow Studio             | 6.13                                                                                   |
| Novacura Mobile Client (Android) | [Google Play Store](https://play.google.com/store/apps/details?id=se.novacura.flow.ng) |
| Novacura Mobile Client (iOS)     | [Apple App Store](https://apps.apple.com/us/app/novacura-flow/id1518800827)            |
| Connectors                       | Database, REST Service                                                                 |

### Flow Connectors

#### IFS Connector

If you do not have a connector set up, you can see an example [here](https://docs.novacura.com/extensibility-and-integration/products/studio/connectors/database/ifs-apps-10/how-to-guides/configuration).

#### REST Connectors

#### REST - Anomaly Rest

A REST Connector Project set up is required to utilize the Microsoft Anomaly Detector Cognitive Service.

Create a new REST Connector named "Anomaly Detector V1.0" and import the configuration file "Anomaly Detector V1.0.ncrcp", for more information see [Import a REST Configuration](https://docs.novacura.com/extensibility-and-integration/products/studio/connectors/rest-connector/how-to-guides/import-a-rest-configuration).

* After the connector is imported, navigate to the connector Authentication and select “…” to the right of API Keys
* Replace the Ocp-Apim-Subscription-Key with KEY from your [Microsoft Anomaly Detector  Cognitive Service](https://docs.microsoft.com/en-us/azure/cognitive-services/anomaly-detector/quickstarts/client-libraries?pivots=programming-language-javascript\&tabs=windows#prerequisites)

<div align="left"><img src="https://3218748546-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiW42YxFsGXIDjQJKNR%2Fuploads%2FLA48UeKI4whjQ9GMiDbu%2F4.PNG?alt=media&#x26;token=9f5d613f-6624-461a-815d-4d52f4ba2fa8" alt=""></div>

* Select “Save” to save the API Keys
* Select “Save” to save the REST Connector Configuration

#### Device Simulator (Optional)

A REST Connector Project setup is required to utilize the Microsoft Azure Device simulator function for testing.

* Create a new REST Connector named "IoT Simulator Azure V1.0" and import the configuration file "IoT Simulator Azure V1.0.ncrcp", for more information see [Import a REST Configuration](https://docs.novacura.com/extensibility-and-integration/products/studio/connectors/rest-connector/how-to-guides/import-a-rest-configuration).

<div align="left"><img src="https://3218748546-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiW42YxFsGXIDjQJKNR%2Fuploads%2FUc2YZjUl5eUeA9buUne1%2Fimage.png?alt=media&#x26;token=91cfe306-af5e-466f-841d-b6469c8e8db4" alt=""></div>

* Select “Save” to save the REST Connector Configuration

#### QuickChart REST Service Connector

A REST Connector Project setup is required to utilize QuickChart API.

Please refer to the Quick Chart home page for more details regarding how to use Quick Chart API: [Quickchart.io](https://quickchart.io/documentation/)

Create a new REST Connector named "QuickChart API V1.0" and import the configuration file "QuickChart API V1.0.ncrp", for more information see [Import a REST Configuration](https://docs.novacura.com/extensibility-and-integration/products/studio/connectors/rest-connector/how-to-guides/import-a-rest-configuration).

Enter your base address, in the example below, [Quickchart.io](https://quickchart.io) was used.

### Flow Properties

Before installing the workflows, it is required to create several **Global** Flow Properties within Novacura Flow Studio.

#### Flow Text Properties

| **Flow Property** | **Example Value** | **Description**                             |
| ----------------- | ----------------- | ------------------------------------------- |
| AppOwner          | ifsapp            | IFS environment application owner (Schema). |

## Installation <a href="#installation" id="installation"></a>

{% hint style="warning" %}
Make sure that you have created all connectors and Flow properties before importing the workflows.
{% endhint %}

### 1. Import Workflows

Import workflows in the file "Anomaly Detector.wap."

{% hint style="warning" %}
Some workflows that have multiple IFS connectors.&#x20;

These should be mapped to the same IFS connector when the import is done. The different connectors are only used for demo purposes.
{% endhint %}

For details see [Import Workflows](https://docs.novacura.com/extensibility-and-integration/products/studio/applications/workflow/how-to-guides/import-workflows)

### 2. Setting Menu Roles

Together with the imported workflows, there will also be a menu. Connect the menu to your roles to make them available for users.

For details see [Setting Menu Roles](https://docs.novacura.com/extensibility-and-integration/products/studio/applications/workflow/how-to-guides/setting-menu-roles)

### 3. Publishing Workflows

Right-click on the Permission Set folder and select **Publish**, within the Server Contents window.  This process can take a few minutes but once complete, a Publish Successful message will be displayed.

If you receive any errors during the publication of the workflow, please review the error detail and consult your support contact with the relevant information.

The workflows will now be available to execute on your chosen Flow client. For instructions on individual Permission Set functions, please consult the function individual documentation provided separately.

For details see [Publishing Workflows](https://docs.novacura.com/extensibility-and-integration/products/studio/applications/workflow/how-to-guides/publishing-workflows)
