Creating background task definitions

It is necessary to create a background task only for your company's custom forms and reports. Background task definitions are already set up where needed for standard SyteLine forms, and those background task definitions are listed on the Background Task Definitions form. For more detail about defining background tasks, see the online help.

Use the Background Task Definitions form to create a record that identifies the background task to TaskMan.

Every report and every utility or activity that can be run as a background process must be listed in the Background Task Definitions form.

Background tasks must meet these requirements:

  • The task name should match the form name to make it easier to identify.
  • Stored procedures must be written in SQL and reside in your SQL application database. Utility and activity forms generally use the Executable Type SP (stored procedure).
  • On-premise environments only: Executable programs must reside in a directory available to the directory where TaskMan resides.

To create a background task definition:

  1. Create a new record on the Background Task Definitions form.
  2. Specify a task name (for example, RunCustomerOrderReport) and, optionally, a description.
  3. Specify an executable:
    • For a report: Specify the name of the report (for example, CustomerOrder) in the Executable Name field and the type of executable (RPT) in the Executable Type field. You must also specify in the Report Type field the type of report.
    • For a stored procedure: Specify the procedure name in the Executable Name field and select SP in the Executable Type field.
    • On-premise environments only: For an executable program: Specify the program name and path in the Executable Name field and select EXE in the Executable Type field.
    • For an IDO: Specify the name in the Executable Name field and select IDOMTH in the Executable Type field.
  4. In the Max Concurrent field, we recommend that you specify 2.
  5. Click the buttons on the form to specify any report options or excluded tasks.
  6. Save the record.

    Your new background task can be called from any form as an event handler.