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).

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.
    • 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.