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:
-
In Administrative Tools, launch the Synergize Process Designer.
-
In the Enterprise Overview panel, right-click the Synergize Processes node and choose Create Process from the context menu.
-
Select the new process titled Untitled.
-
In the Properties window, name the new process RegEx_Parser.
-
In the Toolbar, save the process.
-
Add the following actions to the canvas:
-
Trigger | Delayed Execution | (name) Delay10Sec
-
File Processing | For Each File | (name) ForEachFile
-
Barcode | Read Barcode | (name) ReadBarcode
-
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:
-
In the Enterprise Overview panel, right-click the Synergize Processes node and choose Process Overview from the context menu.
-
In the Process Status panel, click the Play button.
-
Monitor your results in the Activity Log panel, to ensure that your regexParser action is logged.
References:
Source |
Link |
---|---|
|
|