Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
com.dooris.bpm.actionhandler.ReturnRegexHandler

Parameter

Parameter name

Default value

Description

Valid examples

regex

This parameter is used to set the regular expressions.

The following Regex example can be used to extract a valid e-mail from an arbitrary text.

Info

([a-zA-Z0-9.]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9_-]+)

([a-zA-Z0-9.]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9_-]+)

content

The tested string, present as either a variable ${Prozessvariable} or a string directly.

${emailListe}

writeNameInVariable

The process variable into which the results are written.

ersteEmail

matchAll

true

Boolean(true/false). If it is set to true, all results are written to the process variable.

If it is set to false, only the first result will be stored.

false

Example:

In this example a process model with only one task is needed. At process instance start a text which contains email adresses will be inserted into a textfield the SmartformForm. After instance start, only the email addresses from the text should be displayed in a second input field.

...

The ReturnRegexHandler is implemented on the task ‘Return Regex’ with the following parameters and values:

Parameter

Wert

regex

([a-zA-Z0-9.]+@([a-zA-Z0-9-]+\.)+[a-zA-Z0-9_-]+)

content

${sampletext}

writeNameInVariable

emailaddresses

Furthermore, a smartform form is needed with an input field for the text and an output field for the result from the ReturnRegexHandler.

...

After publishing the process, it can be started after entering a text containing email addresses into the first input field.

...

After process start, the Smartform Form can be viewed in "Started process instances" and the e-mail addresses from the text above are displayed in the 2nd input field.

...