Infor SyteLine

SyteLine Background Task Development Guide

Background tasks in SyteLine handle batch processing, scheduled operations, and asynchronous workflows that run without user interaction. From MRP generation to EDI processing to custom data synchronization, the SyteLine task scheduler is the backbone of automated operations. Understanding how to build, configure, and monitor custom background tasks is critical for extending SyteLine's automation capabilities.

Task Scheduler Architecture and Configuration

SyteLine's background task engine is the Mongoose Task Service, a Windows service that polls the BGTasks table for pending tasks and dispatches them to worker threads. Tasks are configured through the Background Task Configuration form (Menu Path: Administration > Background Tasks). Each task definition specifies the task class (IDO method, stored procedure, or custom .NET assembly), execution schedule (cron-like or interval-based), the site context for execution, and the service account credentials. The task engine manages concurrency through the MaxConcurrentTasks setting in the task service configuration—exceeding this limit queues additional tasks. Tasks write status to the BGTaskHistory table, which you should query for monitoring and alerting.

  • Background tasks are managed by the Mongoose Task Service polling the BGTasks table for pending work
  • Configure tasks in Administration > Background Tasks with schedule, site context, and credentials
  • Task types include IDO method invocation, stored procedure execution, and custom .NET assembly execution
  • Task history and status are written to the BGTaskHistory table for monitoring and auditing

Building Custom Background Tasks with IDO Methods

The most maintainable approach to custom background tasks is wrapping your logic in an IDO method and configuring the task scheduler to invoke it. Create a .NET IDO extension method that performs the batch operation, register it in IDO Extensions, then create a background task record pointing to that IDO and method. Within the method, handle your own transaction management for large batches—process records in configurable chunk sizes (typically 100-500 records) with commits between chunks to avoid holding long-running locks. Write progress updates to a custom status table so administrators can monitor execution through a dashboard form. Always include a cancellation check in your processing loop by querying the BGTasks.CancelFlag column, allowing operators to gracefully stop long-running tasks.

  • Wrap batch logic in IDO extension methods for maintainability and upgrade safety
  • Process large datasets in configurable chunks (100-500 records) with intermediate commits
  • Write progress to a custom monitoring table and check BGTasks.CancelFlag for graceful cancellation
  • Configure task parameters through the Background Task Parameters form for runtime flexibility

Error Handling, Retry Logic, and Monitoring

Background task failures are invisible to users, making robust error handling essential. Implement a three-tier error strategy: catch and handle expected business exceptions within your task logic with detailed logging to a custom error table, catch unexpected exceptions at the outer boundary and write them to both your custom table and the SyteLine Event Log (accessible via Administration > Event Log), and implement automatic retry with exponential backoff for transient failures like database deadlocks or network timeouts. Configure email notifications through the SyteLine Alert Manager for task failures by creating an alert that monitors the BGTaskHistory table for error status entries. Build a task monitoring dashboard form that displays running tasks, recent failures, and average execution times from BGTaskHistory.

  • Implement three-tier error handling: business exceptions, unexpected exceptions, and transient retries
  • Write errors to both custom tables and SyteLine Event Log (Administration > Event Log) for visibility
  • Configure Alert Manager notifications for task failures by monitoring BGTaskHistory error statuses
  • Build a monitoring dashboard querying BGTaskHistory for execution times, failures, and trends

Need custom batch processing in SyteLine? Our developers build reliable background tasks for high-volume manufacturing—talk to our team.