Administering Application Servers & Managing Scheduled Tasks

Aptify allows an organization to use external servers to handle some system operations or processing. One or more Application Servers on an organization's network can improve overall system performance by distributing the workload between client PCs, Application Servers, and the Aptify database server.

An Application Server is a network computer that has the Aptify Asynchronous Processor installed. This is a Windows service installed by the Application Server Setup program.

The configured Application Servers download and execute pending asynchronous Process Flow Runs. These runs are automatically generated by a Scheduled Task or in response to a particular system event (such as the creation of a new record).

Using an Application Server provides two primary benefits to an Aptify system:

  • An Application Server can reduce the processing load on client computers. The response time for a client computer improves by offloading the execution of Process Flows to an Application Server.
  • An Application Server can run Process Flows created by Scheduled Tasks. Scheduled Tasks are configured to run on a specific date or at a specific time. This feature can automate recurring tasks that occur at regular intervals (such as sending out a daily sales report).

The following sub-topics are the procedures and reference information related to the administration of Aptify Application Servers.

Application Servers execute asynchronous Process Flow Runs. For more information about Aptify's Process Flow functionality, see Managing Process Pipelines.

Managing Scheduled Tasks

An organization can create scheduled tasks that execute pre-defined Process Flows at a specified date and time. An organization might use scheduled tasks to run lengthy processes after business hours when users are less likely to be impacted or to execute the same processes on a regular schedule without the need for manual intervention.

Users and/or administrators can set up and manage scheduled tasks using Aptify without having to interface directly with the server. The user can specify which tasks to run, the frequency with which the task should run, and the day and time the task should begin and end.

Scheduled tasks are managed using the following procedures:

Before You Use Application Servers to Schedule Tasks

Review the following important information before using the Application Server to run Process Flows:

  • If you plan to schedule tasks locally (i.e., from a client machine, not the Application Servers), Aptify recommends standardizing the directory in which the Aptify client is installed to ensure that locally scheduled tasks execute as expected. If there are different installation paths for the Aptify client in an organization, this can be a problem because the path to the process flow run creation may not be correct. To further limit the effects of an incorrect path, another recommendation is to use the Remote Scheduler as the scheduler agent when scheduling tasks. See Creating a Scheduled Task for more information about creating scheduled tasks with this option.
  • You must use a Trusted Aptify user account with the Aptify Asynchronous Processor. Only Trusted users (that is, users who are validated based on Windows integrated security) can use the Application Server functionality.
    • The user does not need to be logged into the computer in order for the Aptify Asynchronous Processor to execute Process Flows.
    • The user needs the necessary permissions on the computer to create Windows Scheduled Tasks. See Granting Access Rights for Scheduled Tasks for details.
    • The user you specify must be assigned a valid user license in Aptify. The user must also have permissions in Aptify to perform any of the actions that may be assigned to the application server (such as creating or editing records of a particular entity).
    • If you change the user account's Windows password at any time, you must also configure the Aptify Asynchronous Processor service with the updated password. If not, the next time you restart the Application Server, the service will not run. See Changing the Aptify Asynchronous Processor User for more information on the Aptify Asynchronous Processor's user account. 
  • You cannot use the untrusted sa user with an Application Server.
  • The Aptify Asynchronous Processor user must have the necessary privileges required to execute Process Flows. If the account does not have the appropriate permissions, the Process Flow execution will fail.
  • Application Servers execute asynchronous process flows using the Process Pipeline functionality. For information on how to create Process Pipelines, see How to Create a Process Pipeline.

Granting Access Rights for Scheduled Tasks

In order to create or edit a Scheduled Task record that generates a Windows Scheduled Task, an Aptify user must be a trusted user using Windows Integrated Security and a member of one of the following Windows groups on the specified Application Server:

  • Administrators
  • Backup Operators
  • Server Operators

Note that if a user needs to create a Scheduled Task but you do not want to add the user to one of these Windows group, use the Remote Scheduler service to automate the creation of the Windows Scheduled Task. See About the Remote Scheduler Service.

Follow these steps to add a trusted user to one of the Windows groups listed above:

Contact your system administrator if you need assistance managing an Application Server's Windows Groups. 

  1. On the Application Server, open the Computer Management window by clicking Start > Control Panel > Administrative Tools > Computer Management
  2. Within the Computer Management tree, click the plus (+) sign to expand the Local Users and Groups heading.
  3. Click the Groups folder.

    Managing Windows Groups
  4. Double-click AdministratorsBackup Operators, or Server Operators to open the specified group's properties.
    • Not all groups may be available on your Application Server. 
  5. The group's properties screen displays the list of users that are members of the group. Click Add to add another domain user to the group.
  6. Click once to highlight the user that you want to add from the list of available users.
  7. Click Add.
  8. Click OK to add the user.
  9. Close the Computer Management window.

Editing a Scheduled Task

To edit a Scheduled Task, open an existing record and modify one or more parameters. For example, after creating a Weekly task, you can return at a later date and change it to a Monthly task.

Note that a user must have appropriate permissions to edit a Scheduled Task (unless the Service is set for Remote Scheduler). See Granting Access Rights for Scheduled Tasks for details.

For view scheduling, the system automatically changes the Scheduled Tasks record back to Remote Scheduler if a user modifies a view's schedule.

After saving a Scheduled Task, you cannot change the Application Server. To change the Application Server that runs a particular task, disable the original Scheduled Tasks record and create a new one that uses the new Application Sever.


Creating Scheduled Task Categories

Scheduled Task Categories are used to classify scheduled tasks into specific groups which share similar business functionality.

Follow these steps to create a new category:

  1. Open a new record from the Scheduled Task Categories service.
  2. Enter a name and description for the category.
  3. If this category is a sub-category, enter the name of the parent category in the Parent field.

    Scheduled Task Categories Record
  4. Save the Scheduled Task Categories record.

Understanding Application Servers

An Application Server is a service on a computer on the network that executes Process Flow Runs on behalf of the Aptify system. Application Servers execute asynchronous process flows that does not require immediate execution. Asynchronous process flows and process flows executed by a Scheduled Task generate Process Flow Runs, which are then executed separately by an Application Server since they can be run at a later time. Having an Application Server process asynchronous runs helps distribute network load and frees up a user’s workstation to do some other activity. This is also helpful on a web server with e-Business to distribute the load on activities like shipping an order. Shipping an order is labor intensive and allowing the application server to ship the order allows the webserver to be more responsive than might otherwise be if the shipping process was being accomplished by the web server.

The sole purpose of the Application Server is to locate Process Flow Runs records that are in a status of pending and execute the process flow that is attached to the Process Flow Runs record. The way that the Application Server locates the Process Flow Runs records is to poll the database server at regular intervals looking for pending Process Flow Runs. When the Application Server is finished executing the process flow successfully, the Application Server updates the Process Flow Runs record with the results.

An Application Server polls the database server periodically, called the interval. The default setting is ten seconds. The Polling Interval determines how often the Application Server polls the database server to check for pending Process Flow Runs. The setting to control the interval in located the AptifyAsyncProcessor.exe.config in a key called ProcessFlowRunsPollingInterval. This parameter is specified in milliseconds. For most systems, Aptify recommends setting this parameter to a value between 10 and 60 seconds. If necessary, you can set this interval to less than 10 seconds if the system needs to process a large number of asynchronous tasks. However, note that decreasing the Polling Interval will increase the overhead of the Aptify system and may slow down the system. Below is a diagram that may help in understanding how polling works.

It is important to understand what the application server is processing. Remember that if your application server has 5 threads, polls every 10 seconds, and the process flows that are being executed take longer than 10 seconds to run then the all the threads will be consumed in a short amount of time. In cases like that you can increase the threads but that may man that the all the threads will still be consumed on it may take longer to do so.  You can increase the polling interval, but that may mean that process flow runs records will stack up. If desired, you can even add another application server that processes targeted Process Flow Runs.

Here are some additional details, should you need more information:

How the Application Server Communicates with the Database Server

There are two types of server devices supported for use in the Aptify environment:

  • Aptify Database Server: A computer that is running Microsoft SQL server and runs all of Aptify's server components. It stores the Aptify databases.
  • Aptify Application Servers: These are optional servers that can download and execute Process Flow Runs from the Aptify Database Server. An Application Server has the Aptify Desktop client application and the Application Server component installed. One or more Application Servers on the network can run Scheduled Tasks and reduce the workload of client computers.

The following is an overview of how an Application Server communicates with an Aptify Database Server:

  1. A system administrator installs and configures the Application Server component on a network computer.
    • The installation process adds the Aptify Asynchronous Processor to the computer's Windows Services.
    • Do not install the Application Server component on the computer that is running the Aptify Database Server.
    • In general, Aptify does not recommend installing the Application Server component on the computer that is running the Aptify database server in a production environment. However, you can install the Application Server on the database server in a test environment if you want to use this functionality but do not have another computer available for testing.
    • The organization's Aptify Database Server must already be installed and running before you add Application Servers to the system.
    • See Installing an Application Server for installation details. 
  2. Once installed, the Application Server polls the database server at regular intervals.
    • The Application Server is looking for Process Flow Run records with a Status of Pending.
    • Asynchronous Process Flows triggered by an Event Handler, or a Scheduled Task create pending Process Flow Run records.
    • See How to Create a Process Pipeline for general information on creating Process Flows and configuring Event Handlers.
    • See Creating a Scheduled Task for information on creating Scheduled Task records.
    • The Polling Interval parameter determines how often the Application Server polls the database server. See About the Application Server Polling Interval for details. 
  3. The Application Server locates pending Process Flow Runs and downloads them from the database server.
    • When the Application Server downloads a Process Flow Run, the run record is automatically updated: the Status field changes to In-Progress, the Task Sent To Server check box is selected, and the Application Server's name appears in the Client Machine Name field.
    • An Application Server configured to process only targeted Process Flow Runs will only download runs where its name is specified in the Application Server field. The Application Server will not execute untargeted runs (that is, Process Flow Run records that have the Application Server field blank).
    • The Maximum Threads parameter determines the maximum number of Process Flow Runs the Application Server can execute concurrently. See About the Maximum Worker Threads Setting for details. 
  4. The Application Server executes the Process Flow specified by the Process Flow Run.
  5. The Application Server updates the Process Flow Run record with the process results.
    • The record's Status field changes to Complete (if the run was executed without error) or Error (if an error occurred during execution).
    • The Application Server populates the Process Flow Result Code field with the appropriate result if the Process Flow Run completed without error. The available Result Codes depend upon the configuration of the Process Flow.
    • If the Result Code corresponds to a successful result, the Success check box is selected. Users designate specific Result Codes as successful during Process Flow configuration. 
  6. The Application Server continues to poll the database server at regular intervals, as specified by the Polling Interval parameter.

About the Application Server Services

This list displays the services used by Application Servers and Scheduled Tasks as well as the application in which they are located. The applications listed are the default locations for the services. If the service is not available on your system in the listed application, please contact your system administrator. A complete listing of services and applications are located in About the Applications and their Services and About the Services and their Applications.

Services

Applications

Application Servers

Process Pipeline Administration

Process Flow Runs

Aptify Framework Administration
Process Pipeline Administration

Scheduled Task Categories

Process Pipeline Administration

Scheduled Task Services

Process Pipeline Administration

Scheduled Tasks

Process Pipeline Administration

About the Process Flow Runs Service

Aptify automatically creates a Process Flow Runs record each time a Scheduled Task is run. Each record contains information about the status of a single execution of a Process Flow. This information includes the time at which the Process Flow was executed, the input properties used to fulfill the Process Flow, and the current status of the run (Complete, InProgress, Pending, or Error).

Within a Process Flow Run record, the Scheduled Task that generated the run is identified in the Scheduled Task field. Also, the Process Flow Run records that correspond to a particular Scheduled Task are listed on the Scheduled Task's Run History tab.

Aptify automatically creates Process Flow Runs records as necessary; you should not create or update these records manually. 

Process Flow Run Record for a Scheduled Task

About the Scheduled Task Services

Scheduled Task Services records define the scheduling agents that Aptify can use to manage tasks. Aptify includes three Scheduled Tasks Services by default: Windows Scheduler, Remote Scheduler, and Schedule Only.

About the Remote Scheduler Service

This service provides all users with the ability to create a Scheduled Tasks record even those users who do not have the necessary permissions to create a Windows Scheduled Task. This service supports global system functionality that you may want to make available to all users, such as view scheduling, delayed message delivery, or message scheduling.

The system automatically executes the following logic when a user saves a Scheduled Tasks record whose Service is set to Remote Scheduler:

  • The Scheduled Tasks record is saved with Service set to Remote Scheduler.
  • Typically, a user will not create a Scheduled Tasks record directly but will perform an action that creates a Scheduled Task, such as specifying a message for future delivery or scheduling a view.
  • The Remote Scheduler service creates a Process Flow Runs record that is linked to the Update With Remote Scheduler process flow. The Process Flow Run is assigned to the Application Server specified in the Scheduled Tasks record.
  • The Update with Remote Scheduler process flow converts a Scheduled Task's Service from Remote Scheduler to Windows Scheduler and then saves the Scheduled Tasks record.
  • The Application Server polls the database server and the pending Process Flow Run to update the Scheduled Task's service to Windows Scheduler.
  • This generates a Windows Scheduled Task on the Application Server that will execute the Scheduled Task at the appropriate dates and times as specified by the user.
  • Since the Application Server's user account modifies the Scheduled Tasks record, that user account, which should already have the necessary permissions, creates the Windows Scheduled Task in lieu of the user who originally saved the Scheduled Tasks record. 

About the Schedule Only Service

This service is used to indicate a Scheduled Task that stores data related to an event that occurs at a specified date and time, but which does not correspond to a Windows Scheduled Task, and which is not responsible for creating the schedule.

This service is reserved for future use. 

About the Windows Scheduler Service

This is the primary service used by Aptify Scheduled Tasks. When a Scheduled Tasks record is saved with this service specified, Aptify creates a corresponding Windows Scheduled Task on an Application Server.

Note that only users who have the necessary permission to create a Windows Scheduled Task on the Application Server can save a record with this service specified. See Granting Access Rights for Scheduled Tasks for more information on the required permission set.

About Application Server Forms

The sub-topics related to this topic provide field-by-field information on every form related to Application Servers and Scheduled Tasks. This information is intended for use as reference material for the various fields on these forms.

The forms are documented in alphabetical order. Within each form, tabs are also addressed in alphabetical order.

Note that the fields marked as required in this topic are required at the entity level. In some cases, a required field may already have a default value, so a user does not need to specify a value for these fields before saving the record. To review the list of fields required at the entity level, open the appropriate Service Properties dialog (by right clicking the service in the Navigation Bar and selecting Properties) and click the Fields tab.

The following forms are documented in this topic:

About the Application Servers Form

The Application Servers form stores the name of the Application Servers that are installed in Aptify. You should not create these records manually. The Application Servers Setup program automatically creates an Application Servers record each time a new server is installed.

Application Servers Form

Account Information Tab

Default Job Account Name

This is the user account that will be used to run Scheduled Tasks that are created by View Scheduling. See Job Account Name for more information.

Default Job Account Password

This is the Windows Domain password for the Job Account. Note that this field is encrypted by default using the Generic Entity Encryption Key. By default, the sa user and members of the supplied Accounting, Administrators, and/or Users groups have access to this key.

Only users who have access to the key can enter a value in this field. Also, any user who will use View Scheduling also needs access rights to this key in order save the scheduled view's corresponding Scheduled Tasks record.

Depending on the security model that your organization has implemented, you may want to create a new key to encrypt this field and allow only designated users access to that key. This is the recommended approach. Follow these steps:

  1. Log in to Aptify as an administrative user.
  2. Create a new Security Key to encrypt the Default Job Account Password, grant access to the appropriate users for this key, and then update the Default Job Account Password field in the Application Servers entity to use this new key.
  3. Update the Job Account Password field in the Scheduled Tasks entity to use this key, too. See About the Scheduled Tasks Form.

Note that any user who will create Application Servers records and any user who will use View Scheduling needs access to this key. If a user doesn't have access to the Security Key, the Job Account Name and Password fields will appear on the View's Scheduling tab. (Power users can enter a valid Job Account Name and Password, but this may be too advanced for all users.)

See Managing Field Level Encryption for information on field-level encryption and Enabling View Scheduling for information on enabling and administering View Scheduling.

Attachments Tab

The Attachments tab lists any files relevant to the Application Servers record.

General Tab

Name (required)

The Name field identifies the name of the Application Server.

Server Name (required)

The Server Name field displays the server's name as it appears on the network.

Description

The Description field describes the Application Server and can list any details about the server that may be useful to an organization.

About the Scheduled Task Categories Form

This service stores the scheduled task categories, which are used to classify Scheduled Tasks into specific groupings which share similar business functionality. You can also create subcategories to further classify tasks, if necessary.


Scheduled Task Categories Form

Attachments Tab

The Attachments tab lists any files relevant to the record.

General Tab

Name (required)

The name of the scheduled task category.

Description

A description of the scheduled task category.

Parent

Parent task category, if applicable. This field links to another record in the Scheduled Task Categories service. 

About the Scheduled Task Services Form

The Scheduled Task Services record defines which scheduling agents Aptify can use to manage tasks.

Scheduled Task Services Form

Attachments Tab

The Attachments tab lists any files relevant to the record.

General Tab

Name (required)

The name of the scheduled task service.

Description

A description of the scheduled task service.

Object

The object listed in this field implements the scheduling interface for this service. This object resides in the Object Repository.

Assembly (required)

The .NET assembly name of the object that implements this scheduler service.

Class (required)

The Aptify object class containing the functionality for this service. 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.