Messaging and Scheduled Tasks

Click here to access legacy documentation for this feature

Overview

The Messaging and Scheduled Task Utility allows developers to automate server side tasks. These tasks can be simply running an application in the background or invoking an email message. Tasks can be scheduled to run on a regular basis or triggered after a specific action mode within a maintainer web form. Common tasks include: Scheduling daily reports to be emailed, scheduling a series of summaries to be ran over night, and triggering a notification email after a record has been added/updated in a table.

Creating Tasks Groups

All tasks live inside of a task group and you can have multiple tasks inside of a task group. When you call a task, you are actually calling the entire task group to execute the individual tasks in the order they are sequenced. You cannot change the name of the task group after saving. However, you can change the description of the task group.

Task Type

When you create a new task, you are able to add the current task to an existing task group or create a new task group on the fly. You are also able to assign a sequence number for the task to be executed in a specific order when the task group is called.

When working with tasks, often you may need to pass parameters from a maintainer to the task being triggered. To do this, check the box “Accepts maintainer parms” when creating a new task or from the Task Type screen of an existing task.

Accept Maintainer Parms

There is also the option to put Task Groups into Test Mode. When creating or editing a task group check the Enable Test Mode box to have all the emails generated by that task group sent to a specified e-mail address. When the task group is ready for production, simply uncheck the box. Task Groups that have Test Mode enabled will appear bold and in red on the Messaging and Scheduled Tasks page.

Enabled Testing Mode

Message Types

Email a Report

The Email a Report message type can be used to send report applications as an attachment in an email or embedded in the email body.

View more details on emailing a report.

Send a Regular Email

The Send a Regular Email message type is a versatile method of triggering a basic message in text format via Email. Developers can choose to send a static message or dynamically pull data fields from a retrieval application to be included in the message body.

View more details on sending a regular email.

Run a Summary

The Run a Summary message type is used to execute a summary in the background.

View more details on running a summary.

Save Application Output to Server

The Save Application Output to Server message type can be used when an output file is needed to be sent to the server.

View more details on saving application output to the server.

Send an SMS Text Message

The Send an SMS Text Message type is used for any task needing to be delivered via an SMS text message.

View more details on sending an SMS text message.

Call a Maintainer Application

The Call a Maintainer Application message type is a versatile method of triggering a maintainer that houses another purpose. These maintainers can trigger external procedures, other m-Power applications, and other task groups.

View more details on calling a maintainer application.

Merge Data to PDF and Save to Server

The Merge Data to PDF and Save to Server message type is useful when data is needed to insert into an editable PDF form.

View more details on merging data to a PDF and saving to the server.

Merge Data to PDF and Send via Email

The Merge Data to PDF and Send via Email message type is useful when data is needed to insert into an editable PDF form and emailed.

View more details on merging data to a PDF and sending via email.

Built-in Date Parameters

If needing to pass a dynamic date or date range to a target application, the Additional Parameters section can be used. Type the field in which the date value will be passed to and use one of the date parameters listed below.

Date Parameters

Assuming the current date is 2018-01-10, the date parameters would return the following values:

${today} — Current date (2018-01-10)
${tomorrow} — Tomorrow’s date (2018-01-10)
${yesterday} — Yesterday’s date (2018-01-09)

See more date parameters.

Executing Task Groups

Messaging and scheduled tasks can be used to automate many m-Power processes and can be executed in three different ways. The first is through the task and message groups screen. To get there, open the Admin slider menu –> Messaging & Scheduled Tasks –> Tasks and Task Groups.

Once the task group has been created, it can be executed. Click on the green “Test” button under the Test column to run these tasks ad-hoc. Once the system is finished running the task, a message will display stating that the task group has been successfully processed.

The second method to execute a task group is through the scheduler. To get there, open the Admin slider menu –> Messaging & Scheduled Tasks –> Scheduled Tasks. A new scheduled task must be created. To do so, click on the “Add Scheduled Task” button. Select “Task Group” under Scheduled Type. Now, select a task group and how often the task group needs to be run. Tasks can be run every minute, hour, day, week, month, or year. There is also a custom option that can be used to customize the frequency that task groups are run.

Tomcat must be reloaded for the frequency change to be implemented.

The final method to execute a task group is through the after actions tab in a maintainer. Select a maintainer and click on Edit Properties. Then, click on the After Actions tab in the application properties activity. Navigate down to the “Messaging/Call Task Groups” section. Here, select which task group to call after a user either adds, updates, or deletes a record in this maintainer.

Scheduled Tasks

Controls any task groups that wish to be scheduled. Choose a task group or FTP queue. Select a frequency to run the task group. The custom frequency scheduler uses Cron expressions to trigger tasks. Please see the CronTrigger Tutorial for help with using the custom frequency scheduler. Tomcat needs to be reloaded in order for any changes from the scheduler to take effect.

Output Folder Setup

Controls the directory paths used for the ‘Save Application Output to Server’ and ‘Merge Data to PDF and Save to Server’ message types. Assign a name for the output folder option and an absolute directory path as the Folder Path.

The Folder Path only supports output to a local drive. You cannot use a shared network folder to write to.

Messaging Configuration

Prior to running any tasks, the messaging module will need to be configured. Most importantly this will control which m-Power environment applications are found. Additionally, this area is where the email server is configured, SMS credentials are entered and the automatic scheduler is enabled.

See more details on messaging configuration.

Promoting to Production

To promote Task Groups to production, you will need to move all the applications involved. This includes: the target application, the Distribution List Retrieval (if used), and the maintainer application (if used). These applications will be promoted in the regular way via the Promote to Production utility.

See more details about promoting tasks to production.

Updated on July 24, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support