mrc logo mrc logo
  • m-Power m-Power
    What is m-Power?
    Overview Demos Build Process Case Studies Specs Pricing Trial
    m-Power Resources
    Overview How-To Videos Webinars & Podcasts White Papers Fact Sheets
  • Solutions Solutions
    What does m-Power build?
    Overview Database Front-Ends Reporting CRM Systems Business Intelligence Dashboards Inventory Management Mobile Apps ERP Enhancements Modernization Spreadsheets to the web MS Access to the web B2B/Web Portals Scheduling Embedded Analytics Web Forms Workflow Data Exploration Budgeting & Forecasting APIs and Web Services Db2 Web Query Alternative
    Solutions by Industry
    Overview Manufacturing Government Foodservice Software Vendors Logistics & Supply Chain Software Consultants Healthcare
  • Services Services
    Development Services Training Mentoring
  • About About
    Overview Partners Press Releases Careers Events Contact Blog
  • Support Support
    Support Home FAQ Documentation Customer Portal Enhancements Updates Roadmap Techblog
Try m-Power

m-Power Manual

Browse:

  • Home
  • Maintainers
  • Workflow Designer
Back to Manual

Application Workflow Designer

This feature is designed for the developer who wants to customize maintenance applications with a variety of programmatic elements, such as conditional actions, API invoking, easier error message implementation, or even better server-side error checking. Often times, the solution for these needs was to write external objects. However, the feedback we continually received from our customers was that they want to work in m-Power as much as possible, and not need to resort to writing external objects outside of m-Power. With that feedback in mind, we implemented the Workflow Designer. The designer gives you a graphical interface to load a variety of actions or conditions to control the behavior of the program once submit is clicked.

Supported Templates:

Sky: Display and Maintain Rows, Single Row Maintainer, and Display and Maintain Rows Calendar
Bootstrap: Data List with Web Form, Single Web Form, and Calendar.

Overview

Clicking the "Application Workflow" button on the Build and Customize screen of a maintainer will open the Workflow Designer screen. Clicking the "Add actions" button will open a dialog to choose the desired action. All action and condition windows offer a tooltip helper when hovering over the form label.

Conditions:

  • Compare a field value
  • Check if a field has changed
  • Check the action mode (Add/Update/Delete)
  • Check the user's role (Only available with security enabled)
  • Compare a date field to a calculated date value (Only available with true date fields)
  • Lookup returns at least one record (Only available after setting a Lookup Data action)
  • Lookup returns no records (Only available after setting a Lookup Data action)

Actions:

  • Field validation (Server Side)
  • Lookup data via a retrieval
  • Call a task group
  • Set a field form value
  • Send an email
  • Send an SMS text message
  • Redirect to another page
  • Write/Update a database record via a maintainer
  • Call an external 3rd party API

Setting a Condition

After setting a condition, choose the action to follow if the criteria is true or false. If the maintainer should submit as normal, leave the appropriate condition result with no action.

Setting a Condition

Compare a Field Value

Name: Name the conditional check.
Field: Select a field from your current maintainer, the username, or a field from a previous step's data lookup.
Relation: Operator to compare the value.
Value: You may hardcode a value, select a field from the current maintainer, the username, or a field from a previous step's data lookup.
Use Case: Can be used to make sure a field is greater than another field. Such as an ship date must always be after an order date. Hardcode the comparison value where if a feedback field is equal to 'NEGATIVE' to initiate a follow up email. If used after a lookup data action, pass a value to the data lookup to confirm a product number exists in your products table before an order can be placed. Countless other use cases are at your disposal.

Comparing a Field Value

Check if a Field Has Changed

Name: Name the conditional check.
Field: Select the field from the current maintainer to check if the value has changed (add/update).
Use Case: Perform an action if a field has changed. For example, if the order shipping date has changed, send an email to the account manager and the client.

Checking if a Value Has Changed

Check the action mode

Name: Name the conditional check.
Action Mode: Select the action mode to trigger the next step.
Use Case: Perform an action based off the action mode. If an order is added, send a confirmation email and write the order record to a sales table. If an order is updated AND the status has changed to 'SHIPPED', send an email to the customer.

Checking the Action Mode

Check the user's role

Prerequisites: Security enabled, Roles previously created.
Name: Name the conditional check.
Relation: Either 'Equal To' or 'Not equal'
Role: List of roles created from the 'Manage Runtime Roles' in the 'Users, Menu & Security' screen.
Use Case: Can be helpful for role based validation. For example, make sure only certain roles are able to delete records.

Checking the User Role

Compare a date field to a calculated date value

Prerequisites: Must be used with a true date field.
Name: Name the conditional check.
Field: Select a true date field from the current maintainer or from a date field from a previous step's data lookup.
Relation: Operator to compare the date.
+/-: Add or subtract from the current date.
#: Number of units to add or subtract from.
Date Measure: Select days, months, or years to calculate.
Use Case: If an order needs 7 days minimum processing time, if the ship date is within 7 days of the current date, return an error message.

Compare a Date Field

Lookup returns at least one record

Prerequisites: Lookup Data step must proceed this condition.
Name: Name the conditional check.
Condition: Specifies that records have been found from the data lookup step.
Use Case: After passing a customer number to a data lookup over the customers table, if at least one customer record is found, perform another conditional check to make sure said customer is not in an accounting hold status.

Lookup has Records

Lookup returns no records

Prerequisites: Lookup Data step must proceed this condition.
Name: Name the conditional check.
Condition: Specifies that records have not been found from the data lookup step.
Use Case: After passing a customer number to a data lookup over the customers table, if no records are returned, call an error message action for that customer not existing.

Lookup has No Records

Triggering an Action

Select the action to execute when the form is submitted.

Lookup Data via Retrieval

Useful when needing to pass a form value to a retrieval for finding form specific data.

Prerequisites: Previously created retrieval.
Name: Name the Lookup action.
Retrieval: Select the appropriate retrieval from the current dictionary.
Additional URL Parameters: (Optional) Passing parameters to the retrieval can help filter the data so only the desired records are returned.
Map Available Fields To Lookup List:Select the fields to map from selected retrieval to the current maintainer. Additionally, you may select the username or a field from a previous step's data lookup. Map additional fields as necessary.
Use Case: Pass the form's customer number to a customer master retrieval to make sure the customer is a current customer.

Lookup Data via Retrieval

Return an Error Message

Useful for several conditional checks such as field/form validation, action mode validation, role based validation, etc. This is a server side validation check via java prior to writing to the database.

Return an Error Message

Prerequisites: Setting a condition.
Name: Name the error action.
Error Message: The text that will be displayed as the error message.
Apply Error to specific field:(Optional, Bootstrap only) If a field is selected, the error message will appear below the specified field. If not selected, a general error message will appear above the form.
Use Case: Return a custom error message if a custom field condition is not met, if records are not returned from a data lookup step, or if a user's role is not permitted a certain action.

Field Specific Error

Call a Task Group

Prerequisites: Previously created task group in the Messaging and Scheduled Task utility.
Name: Name the action.
Task Group: Select the appropriate task group
Map Fields to Task Group: (Optional) Passes form values from the maintainer to the task group. Map additional fields as necessary.
Use Case: Call a task group to trigger a report be emailed passing through the customer number to filter the emailed report.

Call a Task Group

Set a Field Value

Name: Name the action.
Field to Set: Select the appropriate field to set a value.
Value: Hard code a value or select a field to copy from. You may select a field from the current maintainer, the username, or a field from a previous data lookup step.
Use Case: If in add mode, set an order status to 'PLACED' to begin processing.

Set a Field Value

Send an Email

Prerequisites: Email server set up through Messaging and Scheduled Task Utility message configuration.
Name: Name the action.
To: Specify the recipient. You can hard code an email address and/or select a field that contains the email address from the drop down. Separate multiple addresses/fields with commas.
CC: (Optional) Specify the optional CC recipient. You can hard code an email address and/or select a field that contains the email address from the drop down. Separate multiple addresses/fields with commas.
Address List: (Optional) Select a distribution address list. A single email will be sent to all the email addresses produced by the list.
Map Fields to Address List: (Optional) Pass values from the form to filter the list of address list recipients. Only available after selecting an address list.
Subject: The subject of the email. You can substitute field values into the subject using the drop down button on the right side of the input
Email Message: Serves as the body of the email. Include fields from the maintainer or from previous step's data lookup. Type [[ to see a list of available fields to include in the email.
Use Case: Send a text only email to an account manager an salesman after an order is placed.

Note: Emails sent through this method are interactive. The users' browser will pause until all emails are sent. If there are many emails to be sent, consider using a task group instead which will send them in batch while the user continues to work.

Send an Email

Send an SMS text message

Prerequisites: SMS connection info set up through Messaging and Scheduled Task Utility message configuration.
Name: Name the action.
To: Specify the mobile recipient. You can hard code a mobile number and/or select a field that contains the mobile number from the drop down. Separate multiple numbers/fields with commas.
Address List: (Optional) Select a distribution address list. A single message will be sent to all phone numbers produced by the list.
Map Fields to Address List: (Optional) Pass values from the form to filter the list of address list recipients. Only available after selecting an address list.
SMS Message: Serves as the body of the SMS message. Include fields from the maintainer or from previous step's data lookup. Type [[ to see a list of available fields to include in the message.
Use Case: Send an SMS text message to a customer notifying them once an order status has been sent to 'SHIPPED'.


Send an SMS Message

Redirect to Another Page

Name: Name the action.
Application Type: Select the application type to redirect to.
Select Application: Select the application for the redirect.
URL: This will be auto-populated if selecting an application. Additionally, you may hardcode any URL you wish to redirect.
Map Fields: Select fields from the maintainer form or previous lookup step to the redirect application.
Use Case: Redirect the user to a confirmation retrieval after submitting a new record.

Redirect to Another Page

Write Record via Maintainer

Calls another maintainer to write to a table in one step mode.

Name: Name the action.
Select Maintainer: Select the maintainer that will write to the database.
Action Mode: Specify whether to add, update, delete, or copy data on the database.
Additional URL Parameters: Pass additional parameters to the maintainer when called.
Map Fields: Select fields from the maintainer form or previous lookup step to the called maintainer.
Use Case: If a record is added to one table and must be added to certain subsequent tables, use this action to write the records to the other tables using different maintainers.

Write Record via Maintainer

Call a Third Party API

Name: Name the action.
Type of API: Choose either POST or GET API methods.
API URL: The URL to call the API.
API Headers Specify a comma separated list of any required API Headers (HeaderName:HeaderValue). Type [ to pick from a list of fields to include in the headers.
API Message Body Format: Specify a custom API body or use m-Power's default JSON format. The m-Power default json format is : {field: value, field2:value2,..}
API Message Body: Only available if using custom body format. The API body to POST. Type [ to pick from a list of fields to include in the body.
Use Case: Post a new order record to a third party billing service.

Call an API

Copy/Connect to Existing Action

Copying a Step

Selecting this option allows the developer the ability to duplicate/copy an action or condition and branch off from the step of origin. This prevents the need to manually recreate steps.

Copying an Action
Copying an Action

Connecting a Step

Selecting this option allows the developer the ability to connect steps together. This is helpful when wanting to perform the same action after different conditions. You may remove a connection by clicking the red 'X' on the connection line.

Connecting Steps

Inserting/Removing Steps

You may insert a step inbetween existing steps by clicking the green '+' on the connection line. You may also remove a connection between steps by clicking the red 'X'.

Other Notes:

  • Promoting to production: Promoting a maintainer via the Promotion Utility will automatically promote the workflow/status file. Otherwise, this file is generated in mrcjava/WEB-INF/classes/[DICTIONARY] as MXXXXXs.json. Replace MXXXXX with the maintainer application number.
  • Browser Support: All modern browsers are supported. Internet Explorer does not support the workflow designer in the development interface. However, runtime capabilities are supported. For example, a developer can create a workflow design in Chrome and a user can execute said maintainer with workflow in Internet Explorer.
  • User Role Support: Only menu version 3+ can support using user roles. Please follow this tech blog to upgrade your menu if needed.

Created: April 1, 2019 | Modified: June 12, 2019

Search


Browse By Category

Build Process (13)
Starting with m-Power (8)
Retrievals (10)
Reports (15)
Summaries (4)
Maintainers (17)
Graphs (8)
m-Power Data Explorer (4)
General (24)
Calculations (5)
Utilities (9)
m-Power Administration (23)
Security (11)
Freemarker (6)
m-Painter (29)
Form Validation (5)
External Objects & UDFs (12)
Deprecated Documentation (23)
Bootstrap Templates (7)

Popular Tags

Maintainers Application Properties Admin Summaries Bootstrap Templates Retrievals App Properties Maintainer Popular Build Process Getting Started RPG Database Parameters Production External Objects m-Painter Graphs Reports Email Dates Dropdowns Prompt Screens Graphing Retrieval SQL Bar Graphs Administration DB2 Freemarker Compiling Calculations Data Dictionary Excel Tomcat Graph Properties Video Performance Java Advanced mrc-Productivity Series Record Selections Form Validation Report Security

See all tags »

michaels, ross & cole, ltd. (mrc)

Privacy Policy Cookie Policy Cookie Settings Notice at Collection Do Not Sell or Share My Personal Information

mrc (US)

2001 Midwest Road
Suite 310
Oak Brook, IL 60523
630-916-0662

mrc (UK)

Mortlake Business Centre
20 Mortlake High Street
London, SW14 8JN
+44-20-335-59566


© 2024 mrc. All rights reserved.