Configure a PM Block

Build the configuration settings that Process Designers use to implement how each instance of a PM Block functions.

Overview

Configuring a PM Block involves building the configuration settings that Process Designers use to implement how each instance of that PM Block functions. The configuration settings are built in Process Modeler are separate from the PM Block's functional design.

Configuring a PM Block involves the following:

Permissions

Your user account or group membership must have the following permissions to configure a PM Block unless your user account has the Make this user a Super Admin setting selected:

  • PM Blocks: Edit PM Blocks

  • PM Blocks: View PM Blocks

See the PM Blocks permissions or ask your Administrator for assistance.

Specify General Configuration Settings for a PM Block

Follow these steps to configure general settings for a PM Block:

  1. View your PM Blocks. The PM Blocks page displays.

  2. Click the icon, and then select the Configure PM Block option to view the PM Block configuration.

    Configuration tab to configure general settings for a PM Block
  3. Edit the following information about the PM Block as necessary:

    • In the Name setting, edit the name for the PM Block. This name must be unique and is required.

    • In the Description setting, edit the description of the PM Block. This description displays below the name of the PM Block in the PM Blocks list. This is a required setting.

    • From the Icon setting, select an icon for the PM Block. This icon displays in the PM Blocks list and in the Modeler. This is a required setting.

    • From the Author setting, edit the name of the user who created the PM Block. This is a required setting.

    • From the Version setting, enter the version of the PM Block. This is a required setting.

    • From the Status drop-down menu, select the status for this PM Block:

      • Active: Select the Active status to make this PM Block available for Process Designers to use in their Process models. An active PM Block is accessible through the Object menu on the left of the Modeler.

      • Inactive: Select the Inactive status to make this PM Block unavailable for Process Designers to use in their Process models. The Inactive status does not affect Processes that already implement this PM Block.

    • From the PM Block Start Event setting, select the event in the underlying process from where the PM Block functionality begins.

    • From the Setup Process Start Event setting, select the event in the underlying process from where the PM Block instance begins when clicking the Run Setup option.

  4. Click Save to save the configuration.

Build the PM Block Configuration Panel

From the Panel tab, add controls to build the configuration panel for the PM Block. This panel is displayed when the PM Block is used while designing a process in the Modeler. Process designers will enter values into these controls when configuring each instance of the PM Block.

PM Block configuration may be composed of any of the following controls:

These control are designed similarly to those in Screen Builder. Validation rules can apply to each of these control to verify that the entered value for a PM Block is valid.

Follow these steps to build the Configuration panel for a PM Block:

  1. Click the ellipsis icon , and then select the Configure PM Block option.

  2. Click the Panel tab. The left pane displays available control that can be added to the configuration.

  3. Drag and drop the controls in the required order. These controls will be displayed as the PM Block's settings in the Configuration panel within Process Modeler. Provide helper text for each control to instruct the Process Designer how to configure each setting. See the following links for more details on how to use these controls:

  4. Click Save to save the configuration.

Using the Loop Control

Use a loop to repeat controls in a PM Block. See an example here.

Reference the Value of a PM Block Setting

Follow these guidelines to reference the value of a PM Block configuration in Process Requests:

  1. Locate the PM Block setting in the Configuration panel.

  2. Note its Variable Name value.

  3. Reference that control's value by using the _parent JSON key within mustache syntax

    {{ _parent.config.VariableName }}

The _parent JSON key references Request data outside of that PM Block.

Specify Environment Variables for a PM Block

Specify custom settings for this PM Block that store globally available data that may contain personal or authentication information. These variables, called Environment Variables, are similar to Environment Variables but may only be used for that PM Block. For every instance of this PM Block, these Environment Variables generate and become part of that Request's data.

Reference a Block Environment Variable's Value in a Process

To use a Block Environment Variable in a process, use a Script called from a Script Task to get the value of the Environment Variable. Similar to other Environment Variables, a Block Environment Variable's value may only be acquired from a Script because these variables often contain personal or authentication information that cannot be viewed.

See Environment Variable and Magic Variable Syntax, Usage, SDK, and Script Examples for examples on how to call Environment Variables using supported programming languages.

Follow these steps to specify Environment Variables for a PM Block:

  1. Click the ellipsis icon , and then select the Configure PM Block option.

  2. Click the Environment Variables tab.

    The Environment Variables page displays all variables configured for this PM Block:

    • Field: The Field column displays the label and helper text for the field.

    • Value: The Value column displays the field's value.

    • Environment Variable: The Environment Variable column displays the name that must be used to reference it in scripts.

  3. Click the Add Field button to add a field. (Note: When adding a field for the first time, click Edit Fields and then Add Field.)

    Add Field screen to add a Block Environment variable for a PM Block
  4. In the Field Label setting, enter a label to easily identify this variable. This is a required setting.

  5. In the Helper Text setting, enter text that provides information about this variable. This is a required setting.

  6. Use the Select if this value holds sensitive data checkbox to mask the data for this variable to prevent it from being displayed or copied. Use this setting when this variable may contain personal information, authentication information, or other data to keep private.

  7. Click Add. The new Block Environment Variable will be added to the Environment Variables page.

    Settings for a Block Environment variable

    The PM Block Environment Variable has the following naming structure: PMB_ENVIRONMENT_VARIABLE_NAME_PM_BLOCK_ID, where

    • PMB: "PMB" is an acronym for PM Block.

    • ENVIRONMENT_VARIABLE_NAME: This is the name of the environment variable.

    • PM_BLOCK: Static text to indicate that this Environment Variable belongs to a PM Block.

    • ID: This is a unique ID automatically assigned to the Environment Variable.

    Furthermore, the Environment Variable also displays in the Environment Variables page.

  8. Optionally, click the ellipsis icon , and then select the Edit Field option for the Environment variable to edit. The Edit Field screen displays. Edit the Environment Variable settings as needed, and then click Update.

  9. Click the Done button from the Environment Variables tab when all variables are configured properly.

Run a Case of the PM Block Setup

The Run Setup option allows you run a PM Block Case after selecting a Start Event. By clicking the Run Setup button, users can seamlessly trigger the necessary processes, ensuring secure access and proper configuration before proceeding with further actions in the PM Block.

Follow the steps below to run a PM Block setup:

  1. Select a start event from the Setup Process Start Event setting.

  2. Save the configuration to view the Run Setup button in the Environment Variables tab.

  3. Click the Run Setup option next to the Edit Fields. A case for the PM Block will be created to complete the necessary pre-configuration.

Configure Inbound Variables

From the Inbound Configuration tab, map inbound variables in the JSON format. These variables can then be used while configuring the PM Block object in the Modeler.

To easily use JSON data in the editor, view the Data tab for a previously completed task and copy the required JSON data format from there.

Last updated

Logo

© 2024 ProcessMaker, Inc. All Rights Reserved. Except as otherwise permitted by ProcessMaker, this publication, or parts thereof, may not be reproduced in any form, by any method, for any purpose.