You are here: Reference > Rule types > Service Java rules > Service Java form - Completing the Parameters tab

Service Java form
Completing the Parameters tab

  1. About 
  2. New 
  3. Service 
  4. Parameters 
  5. Exceptions 
  6. History 
  7. More... 

Configure the data mapping for the incoming and outgoing data for a Java service rule on the Parameters tab.

Complete the top section of the tab to specify how to map arguments from the incoming requests to properties. Complete the Return Value section of the tab to specify how the service rule constructs the response.

The data types of the incoming and outgoing values can be simple scalars (Java primitive data types), arrays of scalars, Java objects (instances of Java classes), or arrays of Java objects.

Parameters List

Field

Description

Data Type

Select the data type of the incoming variable. The data types available in the selection list are the Java primitive data types (Boolean, byte, int, short, long, float, double), their array counterparts, and Java String.

To specify that the data type is a Java object or Java object array, click in the field and type the name of the appropriate Java class. For example, java.util.List or com.mycompany.big.blue.Sky.

Name

Enter the name of the external parameter.

Map To

Specify the destination or the type of destination for the value in PRPC. This field presents a subset of the following options, as appropriate for the data type you specified:

  • Clipboard — Use this option when the data in the external variable can be mapped data directly to the clipboard property or activity parameter specified in the Map To Key field.
  • XML ParseRule — Use this option when the data in an incoming string argument contains XML data and you want a Parse XML rule to process the data.
  • HTML PostData — Indicates that the incoming data value is a stream of data posted from an HTML form that contains property key/value pairs.
  • Delimited ParseRule — Indicates that the incoming string contains tabs, commas, or other characters that separate fields, to be processed by a Rule-Parse-Delimited rule.
  • Structured ParseRule — Indicates that the incoming string contains fields in fixed byte-offset positions, to be processed by a Rule-Parse-Structured rule.
  • Custom function rule from a MapTo library, if any exist in your system. Review the function rule to determine what it does.
Map To Key

The value that you specify in this field depends on the option you selected in the Map To field:

  • If the Map To value is Clipboard, enter the property name to which the data is to be mapped. Use curly brace characters to make an indirect reference, if the ultimate name of the destination property is the text value of another property. Choose a property of the appropriate mode (for example Single Value, Value List, or Object) to receive the data.
  • If the Map To value is XML Parse Rule, enter the Namespace name (second key part) and the Element Name name — third key part — 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.

  • If the Map To value is Delimited ParseRule or Structured Parserule, enter the Namespace key part followed by a period and the Record Type key part.
  • If the Map To value is HTML PostData, leave this field blank. The name/value pairs in the string will be mapped to the parameter page of the service activity rather than the primary page.
  • If the Map To value identifies a function rule in a MapTo library, either select a property to hold the results of the function or leave this field blank, as appropriate for the function.

Return Value

Field

Description

Data Type

Select the data type of the return value. The data types available in the selection list are the Java primitive data types (Boolean, byte, int, short, long, float, double), their array counterparts, and Java String.

Do not return BigDecimal values unless the calling system also supports this class. Return a string value, or use a transform (identified in a Registry Java Property Transform data instance). .

Map From

Select the source or the type of source for the return value. This field presents a subset of the following options, as appropriate for the data type you specified:

  • Clipboard — Use when the data for the return value can be mapped directly from the clipboard property or activity parameter specified in the Map From Key field.
  • Constant — Use to specify a fixed value for the response.
  • XML Stream — Use when the data for the return value is an assembled XML document produced by an XML Stream rule.
  • HTML Stream — Use when the data for the return value is a stream of HTML code produced by an HTML rule.
  • HTML Frame — Use when the data for the return value is a stream of HTML data generated by the service activity.
  • Custom function rule from a MapTo library, if any exist in your system. Review the function rule to determine what it does.
Map From Key

The value that you specify in this field depends on the option you selected in the Map From field:

  • For Clipboard, enter the property name from which the data is to be mapped, starting with a dot or a page name and dot.
  • For Constant, enter a literal string. To include blank spaces in your text string, surround the string with double quotes.
  • For XML Stream, enter a Stream Name of the XML Stream rule that is generate the data. The system uses the Primary Page Class of the service as the Applies To key part.
  • For HTML Stream, enter the Stream Name key part of the HTML rule that is to generate the data stream. The system uses the Primary Page Class of the service as the Applies To key part.
  • For HTML Frame, enter the name of the frame specified as a parameter the Show-HTML step of the service activity. Use this to return data from activities that were originally written for interactive browser clients and use the Show-HTML method.
  • If the Map From value is a function rule from a MapFrom library, either select the property that holds the value to be processed by the function or leave this field blank, as appropriate for the function.

About Service Java rules