# WorkflowGen Windows Services & License Activation

## WorkflowGen engine service

Automatic task execution (e.g. overdue exceptions and notifications management) is provided by this Windows Service. This service is installed by the setup and is started automatically after installation. (Refer to [WorkflowGen Windows Services installation](https://docs.workflowgen.com/tech/9.4/manual-installation#workflowgen-windows-services-installation) if the manual installation procedure was used.)

If errors occurred while the service is running, those errors will appear in the Event Viewer (source: **WorkflowGenEngineService**) accessible in the Windows Administrative Tools. All the messages related to this service will be displayed in the **Windows Logs / Application** section.

To manage this Windows service execution, open **Administrative Tools / Services**, then select and open **WorkflowGen Engine (WorkflowGenEngineService)**.

## WorkflowGen directory synchronization service

The automatic user and group synchronization is provided by this Windows Service, which is installed by the setup and started automatically after installation. (Refer to [WorkflowGen Windows Services installation](https://docs.workflowgen.com/tech/9.4/manual-installation#workflowgen-windows-services-installation) if the manual installation procedure was used.)

If errors occurred while the service is running, those errors will appear in the **Event Viewer** (source: **WorkflowGenDirSyncService**) accessible in Windows **Administrative Tools**. All messages related to this service will be displayed in the **Windows Logs / Application** section.

To manage this Windows service execution, open **Administrative Tools / Services**, then select and open **WorkflowGen Directory Sync (WorkflowGenDirSyncService)**.

### Troubleshooting

After a WorkflowGen version upgrade or system change (such as a server update or configuration change), the automatic directory synchronization can fail with the error message `The license file is missing, invalid or your trial period has expired`.

To resolve this issue, perform the following checks on your WorkflowGen system:

* Verify that there is only one license file (`.lic`) in the `wfgen\bin` folder.
* Verify that the license file (`.lic`) is not locked; if so, unlock it.
* Verify that the two WorkflowGen service execution files (`WfgDirectoriesSyncService.exe` and `WfgWorkflowEngineService.exe`) are not locked; if so, unlock them.
* Verify that the account that executes the WorkflowGen services has read/write access to the `\wfgen` folder.
* Verify that the account that executes the WorkflowGen services is a local administrator.
* In the `WfgDirectoriesSyncService.exe.config` file, replace `<add key="WebConfigPath" value="..." />` with `<add key="webConfigPath" value="..." />`.

## License activation

### Overview

You must have a trial, Developer, or Enterprise license to activate WorkflowGen.

You must have a serial number to activate the Developer and Enterprise versions of WorkflowGen. If you don't have one, contact your vendor.

### How to activate WorkflowGen

#### **Install the license file**

1. Remove all current `.lic` files from the `DRIVE:\Inetpub\wwwroot\wfgen\bin` folder.<br>
2. Copy your `.lic` file to the `DRIVE:\Inetpub\wwwroot\wfgen\bin` folder.<br>
3. Make sure the license file inherits the security settings.

#### **Add the serial number to the `web.config` file**

For the Developer and Enterprise editions of WorkflowGen, you must edit the `web.config` file located in the `DRIVE:\Inetpub\wwwroot\wfgen` folder.

1. Edit the `\Inetpub\wwwroot\wfgen\web.config` file.<br>
2. Set your serial number as the value of the `ApplicationSerialNumber` parameter.

### License per user

If you have a license per user, you cannot exceed the maximum number of users supported by your license, otherwise you will receive an error message when you try to launch a new request. However, user management will still be accessible.

If you want to import several users from your enterprise directory (Active Directory, LDAP, etc.), and since only active users are considered, you can choose between the following cases:

* If your enterprise directory has fewer users than the maximum number of users supported by your WorkflowGen license, then you can import all of your users with the option **New user default status** set to **Active**.
* If your enterprise directory has more users than the maximum number of users supported by your WorkflowGen license, then you should import all your users with **New user default status** set to **Inactive** and set the **Self activation** option as follows:
  * If you want to manually activate users authorized to use WorkflowGen, uncheck the **Self activation** option. A user will be able to access WorkflowGen once you activate their account from the Administration Module.
  * If you don’t want to worry about account activation, keep the **Self activation** option checked. New users connecting for the first time will be activated until the maximum number of users supported by your WorkflowGen license is reached.
