Links

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.
Configure a PM Block
Configuring a PM Block involves the following:

Package and Permissions Required

The PM Blocks package must be installed.
Furthermore, 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

Package and Permissions Required

Follow these steps to configure general settings for a PM Block:
  1. 1.
    View your PM Blocks. The PM Blocks page displays.
  2. 2.
    Click the ellipses
    icon, and then select the Configure PM Block option for the PM Block to configure. The Configuration tab displays.
    Configuration tab to configure general settings for a PM Block
  3. 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 from other PM Blocks. This is a required setting.
    • In the Description setting, edit the description of the PM Block. This description displays below the name of the PM Block from the PM Blocks page. This is a required setting.
    • From the Icon setting, select a different icon from the default. By default, PM Blocks use the Cube icon. 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 Category drop-down menu, select one or more PM Block Categories to associate with this PM Block. In doing so, PM Block Categories may be sorted from the PM Blocks page. To remove a PM Block Category that is currently selected, click the
      icon for that selection or press Enter when the drop-down is visible. 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. This PM Block becomes available from the PM Blocks tab in Process Modeler's left-side panel.
      • 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.

Build the Configuration Settings for a PM Block

As part of configuring a PM Block, build its settings. Process Designers will enter values into these settings when configuring each instance of this PM Block in their Process models designed in Process Modeler. These PM Block settings display in Process Modeler's Configuration panel.
PM Block configuration settings may be composed of any of the following control types:
These control types are designed similarly to those in Screen Builder. Validation rules can apply to each of these control types to verify that the entered value for a PM Block configuration is valid to use.

Reference the Value of a PM Block Setting as a Designer

As a Process Designer using a PM Block in your Process, follow these guidelines to reference the setting value of a PM Block during Requests of your Process:
  1. 1.
    Locate the PM Block setting in the Configuration panel from which to get its value during Requests.
  2. 2.
    Note its Variable Name setting value.
  3. 3.
    From a Script called from a Script Task element, reference that setting's value by using the _parent JSON key within mustache syntax, where VariableName is the name of the PM Block setting to get its value:
    {{ _parent.config.VariableName }}
The _parent JSON key references Request data outside of that PM Block.

Package and Permissions Required

Follow these steps to build the Configuration panel settings for a PM Block:
  1. 1.
    View your PM Blocks. The PM Blocks page displays.
  2. 2.
    Click the ellipses
    icon, and then select the Configure PM Block option for the PM Block to configure. The Configuration tab displays.
  3. 3.
    Click the Labels tab. The Panel Configuration page displays.
    The left pane displays control types from which to drag onto the canvas on the right side of that pane.
    Use the Panel Configuration settings to configure the settings that a Process Designer users to configure this PM Block
  4. 4.
    In the Name setting, enter the PM Block's label as it displays as a Process model object. This is not the name of the PM Block itself, which is configured its general settings.
  5. 5.
    Place into the canvas the controls with which to configure your PM Block. Use the controls similarly to Screen Builder by dragging and placing a control into the order to display the settings in the Configuration panel within Process Modeler. Provide helper text for each control to instruct the Process Designer how to configure each setting in your PM Block for use in a Process model. See the settings for the following control types:

Specify Block Environment Variables for a PM Block

As part of configuring a PM Block, specify custom settings for this PM Block that store both globally available data that may contain personal or authentication information. These variables, called Block Environment Variables, are similar to Environment Variables but may only be used for that PM Block. For every instance that this PM Block triggers during a Request, these Block Environment Variables generate and become part of that Request's data.
See the following sections:

View Block Environment Variables for a PM Block

Package and Permissions Required

Reference a Block Environment Variable's Value as a Designer

As a Process Designer using a PM Block in your Process, use a Script called from a Script Task element to get the value from a Block 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 how to call Environment Variables using supported programming languages.
Follow these steps to specify Block Environment Variables for a PM Block:
  1. 1.
    View your PM Blocks. The PM Blocks page displays.
  2. 2.
    Click the ellipses
    icon, and then select the Configure PM Block option for the PM Block to configure. The Configuration tab displays.
  3. 3.
    Click the Environment Variables tab. The Block Environment Variables page displays.
    Global Settings tab displays all global settings configured for a PM Block
    The PM Block Global Settings page displays all global settings configured for this PM Block in tabular format:
    • Setting: The Setting column displays the Block Environment Variable name that is the custom setting.
    • Configuration: The Configuration column displays how the Block Environment Variable is configured.

Add a Block Environment Variable to a PM Block

Package and Permissions Required

Follow these steps to specify a Block Environment Variable for a PM Block:
  1. 1.
    View your PM Blocks. The PM Blocks page displays.
  2. 2.
    View the Block Environment variables for the PM Block in which to add a Block Environment Variable.
  3. 3.
    Click the Edit Fields button, and then click the Add Field button. The Add Field screen displays.
    Add Field screen to add a Block Environment variable for a PM Block
  4. 4.
    In the Field Label setting, enter the label that displays for this Block Environment Variable. The Field Label setting displays in the Setting column. This is a required setting.
  5. 5.
    In the Helper Text setting, enter text that provides information about this setting. The Helper Text setting displays below the Field Label value in the Settings column. This is a required setting.
  6. 6.
    From the Select if this value holds sensitive data checkbox, select to mask the data for this Block Environment Variable to prevent it from being displayed or copied. Use this setting when this Block Environment Variable may contain personal information, authentication information, or other data to keep private.
  7. 7.
    Click Add. The new Block Environment Variable displays in the Block Environment Variables page.
    Settings for a Block Environment variable
    The PM Block has the following naming structure: PMB_EnvironmentVariableName_PMBlockName_uniqueID, where
    • PMB: "PMB" is an acronym for PM Block.
    • EnvironmentVariableName: This is the name of the Block Environment Variable.
    • PMBlockName: This is the name of the PM Block.
    • UniqueID: This is a unique ID automatically assigned to the Block Environment Variable.
    Furthermore, the Block Environment Variable also displays in the Environment Variables page.
  8. 8.
    Optionally, click the ellipses
    icon, and then select the Edit Field option for the Block Environment variable to edit. The Edit Field screen displays. Edit the Block Environment Variable settings as needed, and then click Update.
    Edit Field to edit a Block Environment variable
  9. 9.
    Click the Done button from the Block Environment Variables page when all Block Environment Variables are configured properly.
    Block Environment Variables with an added field
Last modified 2mo ago
© Copyright 2000-2024 ProcessMaker Inc. All rights reserved.