3.1.3 About Simple Tasks or Worker Tasks

Simple tasks, also called worker tasks, let you run custom business logic in your own services outside MicroTx Workflows.

Use simple tasks when a workflow must call logic that is too custom, complex, long-running, or environment-specific to model directly in the workflow definition. Your worker application polls MicroTx Workflows for pending tasks, performs the work, and sends the task result back to MicroTx Workflows by using the REST API or SDK.

Simple tasks are language independent. You can implement workers in Java, Python, JavaScript, Go, or any other technology that can call the MicroTx Workflows APIs. You can also scale workers independently from the workflow server based on workload and performance needs.

Simple tasks also provide a scalable extension model for MicroTx Workflows. Because the worker runs outside the MicroTx Workflows server, you can scale the worker service independently based on workload, resource needs, or deployment topology. This is useful for compute-heavy processing, long-running business logic, integrations that require customer-managed infrastructure, and workloads that should not consume workflow server resources. You can also use simple tasks to integrate externally developed agentic systems or AI services by exposing them through a worker that polls MicroTx Workflows and returns the result.

Examples of simple tasks include:

  • Order validation task: A Java microservice validates order details and returns the validation result.
  • Inventory check task: A Python worker checks inventory levels and updates the task status.
  • Image processing task: A microservice processes an image by using an AI model hosted in your own infrastructure.
  • External system integration task: A worker task connects to an external system or third-party service that requires custom authentication, libraries, or business rules.

Use a simple task when you need full programming flexibility, external dependencies, custom error handling, or direct access to systems that are not exposed through built-in system tasks.

For lightweight logic that can run directly inside the workflow, use an inline task instead of a simple task. Inline tasks are useful for small JavaScript-based operations such as transforming input data, calculating derived values, formatting strings or dates, or performing simple condition checks. For example, you can use an inline task to convert a JSON date string to another format or add two numbers from workflow input for use by a downstream task. See Inline Task.

For more information about simple tasks or worker tasks, see Workers in open-source Conductor documentation.