Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

Service File form - Completing the Request tab

Updated on April 5, 2022

Complete these fields to define processing and data mapping that occurs for each file or each record.

If the Processing Method on the Method tab is:

  • file at a time, complete only one row of the Parse Segments array.
  • by record type, complete a row for each record type, identifying each type in the Record Type field. The order of rows is not significant in this case.
  • record at a time, enter one or more rows in the order that the corresponding appear in the file. For example, if the file contains a single format, enter one row. If the file contains records in alternating formats, enter two rows.

Processing Prolog

FieldDescription
Processing Prolog
Initial Activity Optional. Identify the name of an activity (in the class of the primary page) to run before processing each input file. If the activity you choose accepts input parameters, click the Params button and enter parameter values.

Parse Segments

FieldDescription
Parse Segments How the system uses information in this array depends on the processing method recorded in the Methods tab.

When using a Parse Structured rule to extract property values from more than one record, use care to ensure that the cursor position is reset at the end of each input record. If a delimiter appears as the last character or characters in one record, it must be processed (or skipped over) so the cursor is in the starting position for the next record.

Record Type Optional. Leave blank unless the Processing Method on the Method tab is set to by record type. Used to identify which row of this array to apply to a record parsed from the file. Choose a distinct value for the Record Type value for each row of the Parse Segments array.

Type the keyword $ANY as the Record Type to match records that don't correspond to any other record type value.

For example, assume the input files contain a mix of records with three different layouts — header, detail, and summary — indicated by a single character H, D, or S in byte 1 of each record. If your application needs to process all three types, create three rows in this array with H, D, and S in the Record Type . Records of each type must have a common length. On the Methods tab, enter 0 (zero) for the Record Type Offset position and 1 for the Record Type Length .

On the Methods tab, indicate the length and byte offset position of the record type within the record.

Once? Select to apply this parse segment once.

This option is useful for files that contain one header record followed by one or more detail records, such as in a Microsoft Excel CSV file. Select Once? in the first row to process the header rule. Leave this check box cleared in a second row, to process remaining records.

Map To Enter the action to take in a parse step. Select one of these keywords or a function:
  • Clipboard
  • XML ParseRule
  • Delimited ParseRule
  • Structured ParseRule
  • Skip — Do not process this segment

Or enter the name of a function in the Pega-IntSvcs:MapTo library.

Map To Key Enter a corresponding key for the Map To field:
Clipboard
Enter a property name from the primary page (after a leading period). Use the form Param.name parameter name to set a parameter value on the parameter page of the activity in the Activity field.
XML Parse Rule
Enter the Namespace name (second key) and the Element Name name (third key) of the appropriate Parse XML rule. Separate the Namespace from the Element name with a space. That is, use the syntax "NamespaceName ElementName" and not "NamespaceName.ElementName." The system uses the page class of this service rule as the first key part of the parse rule.
Note: To maintain backward compatibility for service rules created in releases before PRPC Version 5.2, you can specify a data mapping with only a Namespace value. In that case, the system determines the Element Name key at runtime from the root element of the incoming XML document. However, this mapping works only if the Parser Type of the Parse XML rule is set to DOM and validation is not enabled. As a best practice, specify both the Namespace Name and the Element Name of the rule.
Delimited ParseRule
Enter the second and third key parts of a Parse-Delimited rule, separated by a period ( Namespace and Record Type ). The system uses the Page Class you entered on the Service tab as the first key part.
Structured ParseRule
Enter the second key part of a Parse Structured rule ( Record Type ). The system uses the Page Class you entered on the Service tab as the first key part.
Rule-Utility-Function from a MapTo library
Either select a property to hold the results of the function or leave this field blank, as appropriate for the function.
Auth?
Note: Leave blank in most cases. When selected, the system uses two parameters from the parameter page for authentication.

The system uses values of two parameters pyServiceUser and pyServicePassword on the parameter page as authentication credentials for a requestor.

These two parameters can be set in service file processing by earlier rows in this tab can set these values.

ActivityOptional. Identify an activity to run after the data processed by this row is parsed and arrives on the clipboard.
Keep Page? Select to cause the primary page of the activity identified in the previous field to be retained after processing of this row is complete.

Clear to cause the primary page to be reinitialized to empty after processing of this row completes.

Processing Epilog

FieldDescription
Processing Epilog
Final ActivityOptional. Identify an activity (that applies to the primary page class) to run after the entire file is processed. For example, this activity may commit changes to the database.

Checkpoint Processing

FieldDescription
Checkpoint Processing
Frequency Optional. Enter a positive number to cause the system to commit database changes after processing a number of input records matching that count. For example, enter 100 to cause a Commit method to execute after processing 100 input records. When this field is not blank, a final Commit operation also occurs after all input records are processed.

If this field is blank, no automatic commit operations are performed.

This field supports the Global Resource Settings syntax (=.PageName.PropertyName). The default property name for this field is pyCommitFrequency. For more information, see Using the Global Resource Settings feature.

Success Criteria Optional. Identify a when condition rule to be evaluated after each input record is processed. If this rule evaluates to false, a database rollback occurs, backing out to the most recent commit operation. Processing of this input file is abandoned.

The system records in instances of the Log-Service-File class the current processing status of each file, and can retry from that point. Checkpointing can work in conjunction with the Attempt Recovery fields on the File Listener form, to allow recovery from a temporary input/output failure.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us