MOND Cloud by ConnectGlobalOne

Lesson 10 Link to other lessons

Generating a Process Instance Identifier based on a Pattern


In this section you will learn how to generate a unique number based on a pattern. This pattern generator can also be invoked from a MOND service.

To set the Process Instance Identifier for a Business Process , Login to the MOND BPM Designer, and follow the steps given below:

Step 1

  • Navigate to Designer -> Business Process Model. List of existing Business Process diagrams will be displayed

MOND BPM Diagram

Step 2

  • Click any of the models. The business process diagram will be displayed.On the menu bar, click Properties.(A new window will open)
  • Enter the Process Instance Identifier pattern using the following options, close the screen and click Save Process.

MOND BPM Diagram

Rules & Examples

  • The pattern can be made up of several Blocks, and each block can have its own separator.
  • Blocks are defined within '[' and ']'.
  • Each Block can have a Fixed Text or a Variable Text.
  • The variable part can be current year, current month, current date, current hour, current minute, current second or a running Unique Serial number for each Business Process.
  • The pattern [MCC]-[%Y]-[%UniqueNumber-4] will generate MCC-2014-0001, MCC-2014-0002 and so on in the year 2014.


Pattern Block: Fixed Text

  • To add any fixed text to your number generator pattern, include the text within '[' and ']'.
  • Examples: [Cust], [Case], [Empl] etc.

Pattern Block: Unique Serial Number

  • To add a unique serial number, use the pattern [%UniqueNumber].
  • Examples: [%UniqueNumber],results in 1, 2, 3 etc.

Pattern Block: Unique Serial Number Padded with Zeros

  • To add a unique serial number, padded with zeros, use the pattern [%UniqueNumber-5].
  • Examples: [%UniqueNumber-4],results in 0001, 0002, 0003 etc.
  • Examples: [%UniqueNumber-5],results in 00001, 00002, 00003 etc.
  • Examples: [%UniqueNumber-6],results in 000001, 000002, 000003 etc.

Pattern Block: Unique Decreasing Serial Number Padded with Zeros

  • To add a unique serial number that decreases for each invocation, padded with zeros, use the pattern [%UniqueDecreasingNumber-5].Enter the start number in the Process Definition
  • Examples: [%UniqueDecreasingNumber-4],results in 0099, 0098, 0097 etc. when the start number is 99
  • Examples: [%UniqueDecreasingNumber-5],results in 00099, 00098, 00097 etc. when the start number is 99
  • Examples: [%UniqueDecreasingNumber-6],results in 000999, 000998, 000997 etc. when the start number is 99

Pattern Block: Current year

  • Use [%Y] to get the current year in 4 digits, or [%y] to use the last 2 digits of the year.
  • Examples: [%Y] results in 2015 in the year 2015 while [%y] results in 15 in the year 2015.

Pattern Block: Current year(Century)

  • Use [%C] to get the Four-digit year divided by 100, formatted as two digits with leading zero as necessary, i.e. 00 - 99.
  • Examples: [%C] results in 2015 in the year 15 while [%C] results in 00 in the year 2000.

Pattern Block: Current month(Text)

  • Use [%b] or [%h] to get the abbreviated current month.
  • Examples: [%b] results in Jan when used in January while [%b] results in Mar when used in March.

Pattern Block: Current month(Text)

  • Use [%B]] to get the full month.
  • Examples: [%B] results in January when used in January while [%B] results in March when used in March.

Pattern Block: Current month(Number)

  • Use [%m] to get the Month, formatted as two digits with leading zeros as necessary, i.e. 01 - 12.
  • Examples: [%m] results in 01 when used in January while [%m] results in 03 when used in March.

Pattern Block: Current day(Number)

  • Use [%d] to get Day of month, formatted as two digits with leading zeros as necessary, i.e. 01 - 31.
  • Examples: [%d] results in 01 when used on the first day of a month while [%d] results in 10 when used on the 10th of any month.

Pattern Block: Current day(Number)

  • Use [%e] to get Day of month, formatted as two digits, i.e. 1 - 31.
  • Examples: [%e] results in 1 when used on the first day of a month while [%e] results in 10 when used on the 10th of any month.

Pattern Block: Current day(Number)

  • Use [%j] to get Day of year, formatted as three digits with leading zeros as necessary, e.g. 001 - 366 for the Gregorian calendar.
  • Examples: [%j] results in 1 when used on January 1st while [%j] results in 355 when used on the 21st December.

Pattern Block: Current day(Text)

  • Use [%A] to get the full name of the day of the week, e.g. "Sunday", "Monday".
  • Examples: [%A] results in Sunday when used on Sunday while [%A] results in Tuesday when used on a Tuesday.

Pattern Block: Current day(Text)

  • Use [%a] to get the short name of the day of the week, e.g. "Sun", "Mon".
  • Examples: [%a] results in Sun when used on Sunday while [%a] results in Tue when used on a Tuesday.

Pattern Block: Current Hour

  • Use [%H] to get the Hour of the day for the 24-hour clock, formatted as two digits with a leading zero as necessary i.e. 00 - 23.
  • Examples: [%H] results in 05 when used at 5:00AM while [%H] results in 19 when used at 19:00 Hours.

Pattern Block: Current Hour

  • Use [%I] to get the Hour for the 12-hour clock, formatted as two digits with a leading zero as necessary, i.e. 01 - 12.
  • Examples: [%I] results in 05 when used at 5:00AM while [%I] results in 07 when used at 19:00 Hours.

Pattern Block: Current Hour

  • Use [%k] to get the Hour of the day for the 24-hour clock, i.e. 0 - 23.
  • Examples: [%k] results in 5 when used at 5:00AM while [%k] results in 19 when used at 19:00 Hours.

Pattern Block: Current Hour

  • Use [%l] to get the Hour for the 12-hour clock, i.e. 1 - 12.
  • Examples: [%l] results in 5 when used at 5:00AM while [%l] results in 7 when used at 19:00 Hours.

Pattern Block: Current Minute

  • Use [%M] to get the Minute within the hour formatted as two digits with a leading zero as necessary, i.e. 00 - 59.
  • Examples: [%M] results in 05 when used at 5:05AM while [%M] results in 22 when used at 19:22 Hours.

Pattern Block: Current Second

  • Use [%S] to get the Seconds within the minute, formatted as two digits with a leading zero as necessary, i.e. 00 - 60.
  • Examples: [%S] results in 05 when used at 5:06:05AM while [%S] results in 22 when used at 19:10:22 Hours.

Pattern Block: Current Millisecond

  • Use [%L] to get the Millisecond within the second formatted as three digits with leading zeros as necessary, i.e. 000 - 999.
  • Examples: [%L] results in 005 when used at 5:06:07:005 AM while [%L] results in 022 when used at 19:10:21:022 Hours.

Pattern Block: Current Nanosecond

  • Use [%N] to get the Nanosecond within the second, formatted as nine digits with leading zeros as necessary, i.e. 000000000 - 999999999.
  • Examples: [%N] results in 999999912 when used at 5:06:07:005:999999912 AM while [%N] results in 120999912 when used at 19:10:21:022:120999912 Hours.

Continue to tutorials