SPS Action: RegEx Parser

Created by Ryan Sparrow, last modified by Paul Scobie on Feb 03, 2015

RegEx Parser Action


Synergize.ProcessServer.Actions.Core.dll

v 1.0.0.15 SP38

This feature allows you to define how to parse data out of a string value.

Process Properties

Activity

Type

Description

Bindable

Name

Sting

Name of the action.

False

Description

String

Description of the action.

Max 255 characters.

False

Enabled

Boolean

True or False

False

Action Properties

Activity

Type

Description

Bindable

Name

Sting

Name of the action. See here for naming best practices.

False

Description

String

Description of the action.

Max 255 characters.

False

Enabled

Boolean

True or False

False

Expression

String

The regular expression that will be used to parse the string.

Any groups will be available for binding.

True

Input

String

The string to parse.

Typically bound to the previous action's .document property

True

Configuration

Type

Description

Bindable

Use Code 128

Boolean

Use the Code 128 Symbology when reading barcodes.

False

Use Code 39

Boolean

Use the Code 39 Symbology when reading barcodes.

False

Use Ean 13

Boolean

Use the Ean 13 Symbology when reading barcodes.

False

Use Interleaved 2 of 5

Boolean

Use the Interleaved 2 of 5 Symbology when reading barcodes.

False

To Build the Regex Parser Action Sample:

  1. In Administrative Tools, launch the Synergize Process Designer.

  2. In the Enterprise Overview panel, right-click the Synergize Processes node and choose Create Process from the context menu.

  3. Select the new process titled Untitled.

  4. In the Properties window, name the new process RegEx_Parser.

  5. In the Toolbar, save the process.

  6. Add the following actions to the canvas:

    1. Trigger | Delayed Execution | (name) Delay10Sec

    2. File Processing | For Each File | (name) ForEachFile

    3. Barcode | Read Barcode | (name) ReadBarcode

    4. Text Processing | RegEx Parser | (name) regexParserAction

Action

Name

Delay10Sec

Enabled

True

Timeout Duration

00:00:10

Binding

none

Action

Name

ForEachFile

Enabled

True

Error Directory

Path\To\Your\Files\Error

Processed Directory

Path\To\Your\Files\Processed

Source Directory

Path\To\Your\Files

Working Directory

Path\To\Your\Files\Working

MinimumFileAge

00:00:15

OnFailureAction

Move

Recursive

Leave at False by default

SearchPattern

Leave at *.* by default

UseWorkingDirectory

True

Action

Name

ReadBarcode

Enabled

True

Use Code 128

False

Use Code 39

True

Use Ean 13

False

Use Interleaved 2 of 5

False

Filename

{ForEachFile.CurrentFile.FullName}

ForceReadWithEngine

False

Mask

^\d{2}$ This will only find 2 digit barcodes, all others will be ignored

Action

Name

ParseBarcode

Enabled

True

Expression

^\d{2}$ This will only find 2 digit barcodes, all others will be ignored

Input

{ReadBarcode.Barcode}

7. Save the process

To Run the RegEx Parser Action Sample:

  1. In the Enterprise Overview panel, right-click the Synergize Processes node and choose Process Overview from the context menu.

  2. In the Process Status panel, click the Play button.

  3. Monitor your results in the Activity Log panel, to ensure that your regexParser action is logged.

References:

Source

Link