You are here: Reference > Rule types > Service Files > Service File form - Completing the Request tab

Service File form
Completing the Request tab

  1. About 
  2. New 
  3. Service 
  4. Method 
  5. Request 
  6. History 
  7. More... 

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:

Processing Prolog

Field

Description

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

Field

Description

Parse Segments

add rowHow 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:

Map To Value

Instructions

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.

a 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.

Activity

Optional. 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

Field

Description

Processing Epilog  
Final Activity

Optional. 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

Field

Description

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.

Related Topics Link IconRelated information