Accelerator Common Scheduler - Implementation Template

(0 reviews)

home

This implementation template is a shared component of MuleSoft Accelerators, which accelerate the implementation of essential integration use cases.

The solution includes pre-built APIs, connectors, and integration templates that help unlock business-critical data from external systems and guide you in adopting best practices synthesized from thousands of customer implementations. Use these assets as is or extend them to meet your company’s unique needs.


Overview

The Common Scheduler is used to initiate actions on a scheduled basis. The application maintains job information in two Object Stores:

  1. jobs
  2. job-history

The jobs object store contains the number of unique jobs/processes that are actively maintained for schedule. The job-history store will maintain all the jobs that have been triggered and processed so far.

Available operations

This template supports the following operations made via HTTP requests.

Status update callback

The patch:\callback\{id} endpoint is used to update the current run status into the objectstore.

query params:

  • status - required, must be either success or failure
  • timestamp - optional, in format "yyyy-MM-dd'T'HH:mm:ss" (default is now() >> p('common-scheduler.timezone'))
Get value for given key from object store

The get:/objectstore/{os}/{key} endpoint is used to get the values from the specified Object Store (jobs or job-history) for a given key.

Get all keys from object store

The get:/objectstore/{os} endpoint is used to get all the keys from the specified Object Store (jobs or job-history).

Getting started

bulb.png The Getting Started with MuleSoft Accelerators guide provides general information on getting started with the accelerator components. This includes instructions on setting up your local workstation for configuring and deploying the applications.

Once your workstation has been set up and the application template imported into Anypoint Studio, proceed with the Prerequisites section.

Prerequisites

To configure a job for the common scheduler, you must set the following properties:

Property NameDescription
scheduler.hostHostname of the target application to invoke
scheduler.portPort number of the target application listener
scheduler.methodHTTP method to use for the request
scheduler.pathPath to use for the request
scheduler.os-keyObject store key to use for the job identifier

Deployment

Each Accelerator implementation template in Exchange includes Bash and Windows scripts for building and deploying the APIs to CloudHub. These scripts depend on repositories, global settings, deployment profiles, and associated properties configured in the Maven settings.xml file. In particular, make sure the common properties for your environment have been provided in the CloudHub-DEV profile (e.g., Anypoint Platform client ID and secret).

For additional details, please refer to the Application Deployment section of the Getting Started Guide.

Required property overrides

Many templates can also be run from Anypoint Studio without having to customize the Run/Debug profiles. However, some templates make use of hidden deployment properties to protect sensitive information (e.g., passwords and secret keys). These properties must be supplied to the runtime by updating the configuration profile and adding them as VM arguments. At a minimum, the following properties must be customized to reflect the target deployment environment.

Property NameDescription
common-scheduler.http-client.client-secretRequired if using API Manager to secure this API

Additional resources


Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onSep 21, 2023
Asset overview

Asset versions for 1.6.x

Asset versions
VersionActions
1.6.0