Overview

Teamworks does not provide a model artefact specifically designed to maintain constants used within the Solution. Constants are used to promote consistency, improve maintenance and reduce typographical errors. Exposed Process Values (EPVs) are intended to be used to allow business users modify the parameters affecting business rules within the solution. However, EPVs may also be used to maintain constants.

For each EPV variable the External Name, Variable Name, External Description and Default Value should all be identical, as illustrated in Figure 1. Constants should not be directly exposed within the user interfaces, use localization resources instead.

Constants

2 comments on"Constants Pattern"

  1. This pattern is controversial. Indeed it is one way of trying to implement constants or enumerations, which are not a native concept or feature in IBM BPM. However there are multiple reasons not to do it, at least not as a general practice.

    First three discussion threads about constants, enumerations, exposed process value, environment variables etc:

    Constant Variables
    https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014872168

    EPV (Exposed Process Variables) preferred over ENV as process constants
    https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014918388

    Best Practices – Global Variables\Constants\Enums
    https://www.ibm.com/developerworks/community/forums/html/topic?id=69606b61-9f82-41c5-a5f6-ca577cb5dd64

    Also see the official documentation (this link is for 8.5.6):
    https://www.ibm.com/support/knowledgecenter/SSFPJS_8.5.6/com.ibm.wbpm.wle.editor.doc/topics/creating_exposed_process_values.html
    The recommended naming convention, in case one would ever like to expose EPV constants to an admin group, is different from the typical constant/enumeration naming such as EXAMPLE_CONSTANT.
    “Variable names should start with a lowercase letter, with subsequent words capitalized like so: myVar. Do not use underscores or spaces in variable names. Variable names are case sensitive.”

    • DennisParrott May 24, 2017

      Of course there are many techniques as outlined in the various discussions that can be used to implement constants in IBM BPM. The important thing is to promote consistency within your organisation to avoid multiple developers using different techniques within the same solution, as this will only lead to higher maintenance costs. Personally I have not found any issues using EPVs to implement constants. EPVs should not be used for text strings used for display purposes. Localization resources should be used for this purpose. Therefore the 64 character limit for EPVs should not cause an issue.

Join The Discussion

Your email address will not be published. Required fields are marked *