Accelerator Common Scheduler - Implementation Template
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:
- jobs
- 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
orfailure
- 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
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 Name | Description |
---|---|
scheduler.host | Hostname of the target application to invoke |
scheduler.port | Port number of the target application listener |
scheduler.method | HTTP method to use for the request |
scheduler.path | Path to use for the request |
scheduler.os-key | Object 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 Name | Description |
---|---|
common-scheduler.http-client.client-secret | Required if using API Manager to secure this API |
Additional resources
- The Data mappings tab describes the available DataWeave transformation scripts.
- See the Common Scheduler documentation for more details about how this service works.
- Refer to the Accelerators documentation home for more information about the MuleSoft Accelerators.