Configuring Multiple instances of New Application Server in Aptify 6.4

Aptify recommends that the New Application Server should be installed and used for a better experience.

The new application server that was available in Aptify Marketplace listing have been integrated in 6.4 release. The new application server has been replaced by the old application server in Aptify setup.

There may be occasions when an organization wants to run more than one Aptify Application Server process on the same computer. For example, an organization may want to use the same Application Server for their test and development environments. Starting from Aptify 6.4, now multiple instances of the Aptify Asynchronous Processor can be run on the same computer.

Once the initial instance of the Application Server is installed and the version of Aptify Asynchronous Processor is copied over from the Aptify update, you can configure additional instances on the same computer as needed.

Note for installing Aptify 6.4 Application Server

If your Application Server was configured to run multiple instances of the Aptify Asynchronous Processor in a previous release, you do not have to perform the steps below after applying the updated version of the Aptify AsyncProcessor.exe file if the database server is already running the previous Aptify release and the Application Server is running the Aptify AsyncProcessor.exe file from the previous release. 

Pre-install requirements

Make sure your environment has the following items installed:

  1. .NET 4.8 framework https://dotnet.microsoft.com/download/dotnet-framework
  2. Aptify Desktop client (instructions/download can be found on Quick list for setting up a new Aptify database server/desktop client) Make sure to connect the Desktop client to the DB server at least once before proceeding.

You must have the Aptify Object Repository Service running for this to work. That is installed alongside the Aptify Desktop client automatically. If you don't have it (e,g, you copied the Aptify 5.0 folder instead of running through the install) it can easily be added per the below instructions.

Follow the steps below to configure additional instances of the Aptify Asynchronous Processor on the same server.

  1. Create a second Aptify program files folder for the second instance on the application server.
    • This can be done by copying the contents and folder structure of the first instance (typically founds at: C:\Program Files\Aptify 5.0 or 5.5) to a new name and location (for example, C:\Program Files\Aptify Second Instance)
       
  2. If you have not already done so, copy the updated AptifyAsyncProcessor.exe and AptifyAsyncProcessor.exe.config files included the Aptify update distribution file. The files are located in the Application Server Update folder.
  3. Replace the existing AptifyAsyncProcessor.exe and AptifyAsyncProcessor.exe.config files in the second's instances Aptify program files folder with the new files.

Aptify Setup

  1. You'll need to setup an Aptify user to run the App Server. If you do not have a user already setup for this, you can create a new user or update an existing user to have the proper permissions.
  2. This user needs to have the Administrators and Application Servers security groups applied. Otherwise, it can use an End User license. Tie this user to an Employee record on the final step of the wizard.

  3. Navigate to the Application Servers service under the Process Pipeline application. Create a new record.
  4. Under Name, you can enter whatever you'd like. Under Server Name, enter the server name and specific SQL instance if applicable.
  5. On the Account Information tab, enter in the username and password (including domain) of the Aptify User who will be running this Async service. This should either previously have been setup or setup in Instructions 1→4 above.
  6. Make a note of the Application Server ID record that was created.

Config File Settings

This process will setup an Async Service target the typical C:\Program Files\Aptify 5.0 folder. Note, you can also have it target other folders which may be preferred to separate the Async Processor's bin folder from the Aptify 5.0 client folder. To do so, All the config file changes should happen in that new folder as well.

This process assumes your Aptify 5.0 folder has the AptifyAsyncProcessor.exe.config file. Make sure you are using the latest Application Server files.

You should then have these files in your Aptify 5.0 bin folder:

  • AptifyAsyncProcessor.exe
  • AptifyAsyncProcessor.exe.config
  • AptifyCreateProcessFlowRun.exe
  • AptifyCreateProcessFlowRun.exe.config


  1. Open the AptifyAsyncProcessor.exe.config file and configure the new ServiceName and ServiceDisplayName attributes to provide a unique name and display name for the service on this application server. (Where you setup a separate folder)

  2. Find the attribute named "Aptify.Framework.LoginServices.AptifyLogin.Server".

  3. Insert your database server in the value, replacing the "Insert  Server Name Here" section.

    1. Make sure quotations remain surrounding this and other attributes so your database should be like "Insert Data Server Application name"

    2. If your database is setup on a different instance than default, make sure to specify the full servername/instance.

  4. Find the attribute named "Aptify.Framework.BusinessLogic.ProcessPipeline.AptifyAsyncProcessor.AptifyApplicationPath".

  5. Insert your Aptify 5.0 folder path here in the value, replacing the "Insert Aptify Client Application Path Here" section.

    1. Make sure quotations remain surrounding your DB, like "C:\Program Files\Aptify 5.0"

    2. If you are setting up your Application Server under a different folder, enter it here, e,g, "E:\Apps\AptifyAsync"

  6. Find the attribute named "Aptify.Framework.BusinessLogic.ProcessPipeline.AptifyAsyncProcessor.ApplicationServerID".

  7. Insert your Application Server ID in the value (created in the previous section) replacing the "Insert Application ID Here" section5.

  8. Check for the below given attributes are available, if not you need to add these:

    <add key="Aptify.Framework.BusinessLogic.ProcessPipeline.AptifyAsyncProcessor.GetAttributeValuesFromAptify" value="1"/>

    <add key="Aptify.Framework.BusinessLogic.ProcessPipeline.AptifyAsyncProcessor.RestartAfterMinutes" value="0"/>

    <add key="Aptify.Framework.BusinessLogic.ProcessPipeline.AptifyAsyncProcessor.RestartAfterProcessFlowRunsCount" value="0"/>

  9. Aptify Multi Async processor-specific config settings.

There are a few other attributes in the AptifyAsyncProcessor.exe.config file for the Async service.

  1. Find the attribute named "Aptify.Framework.BusinessLogic.ProcessPipeline.AptifyAsyncProcessor.ServiceName".
  2. Insert your service name in the value, replacing the "AptifyAsyncProcessor" value if not applicable.
  3. Find the attribute named "Aptify.Framework.BusinessLogic.ProcessPipeline.AptifyAsyncProcessor.ServiceDisplayName".
  4. You can enter whatever you'd like here as the display name of the Windows service, you will re-use this later. Insert your service name in the value, replacing the "Aptify Asynchronous Processor X 1" value if not applicable.
  5. Find the attribute named "Aptify.Framework.BusinessLogic.ProcessPipeline.AptifyAsyncProcessor.GetAttributeValuesFromAptify".
  6. This is set to 0 by default, meaning most values like ApplicationServerID, ProcessUntargettedRuns, etc will be taken from the config file rather than what's in Aptify. This should be left as is, or changed to 1 if you'd prefer to have Aptify manage these config settings.
  7. For example:

    <add key="Aptify.Framework.BusinessLogic.ProcessPipeline.AptifyAsyncProcessor.ServiceName" value="AptifyAsyncProcessorForSecondInstance"/>
    <add key="Aptify.Framework.BusinessLogic.ProcessPipeline.AptifyAsyncProcessor.ServiceDisplayName" value="Aptify Async Processor Second Instance"/>
    <add key="Aptify.Framework.BusinessLogic.ProcessPipeline.AptifyAsyncProcessor.GetAttributeValuesFromAptify" value="0"/>
  8. Save and Close the config file.

    Note

    When adding an instance, at least one instance will need to have the ProcessUntargetedRuns setting in the AptifyAsyncProcessor.exe.config file updated (set to 1) to process runs that are not targeted at a specific Application Server. See About the Process Untargeted Runs Setting for more information. Users may also need to configure the additional attributes per the specifications in Modifying AptifyAsyncProcessor.exe.config.

Windows Service Creation

Once these items have been set up, there's a simple way to create your Aptify Async Windows service.

  1. As a user with administrative rights, open a command prompt, navigate to following .NET Folder directory on your machine where InstallUtil.exe is located (generally it is located at C:\Windows\Microsoft.NET\Framework\v_number).
    1. Run the InstallUtil.exe utility against the second instance of the AptifyAsyncProcessor executable. Refer to the below command:

      C:\Windows\Microsoft.NET\Framework\ v4.0.30319{}InstallUtil.exe "FullPathtotheAptifyAsyncProcessorExecutable\AptifyAsyncProcessor.exe"
    2. The above command will create your Windows Service
  2. Now we need to set up the Async Processor to use the right user. Type Services.msc into the Windows Start Menu. Then double click the Aptify 5.0 Asynchronous Processor (or whatever yours is named).
  3. Under the Logon tab, change it from Local System account to This Account and specify the username/password for the Aptify user account that runs the app server. This should be the same values that are on the Application Server Account Information tab.

  4. On the Recovery Tab, you can specify optional actions if the service fails. At the minimum, it's recommended to setup Restart for the First and second failure. Click Apply and OK.
  5. Right-click the Async Service, and click start. (By default it'll start up with the server in the future) If it starts, great.
     
  6. If it's having trouble logging into the database or executing certain files, it may immediately stop after starting. Check the Event Viewer on the Application Server for more details as well as the Event Viewer on the database server.
  7. The most common issue is usually the Aptify 5.0 folder running the Async service is out of sync with the Object Repository. Try performing a full object repository sync on the folder and logging in to confirm the Desktop client is functional.

    Note: Repeat above steps as needed to create additional instances of the Aptify Asynchronous Processor on the same server.