Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 6 Current »

Description

This handler returns the results of a regular expression as a string.


Class

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.

([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 Form. After instance start, only the email addresses from the text should be displayed in a second input field.

Process model:

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 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 Form can be viewed in "Started process instances" and the e-mail addresses from the text above are displayed in the 2nd input field.

  • No labels