Portlet Factory, Version 6.1.2


 

Service Operation builder inputs

This topic describes the inputs for the Service Operation builder.

 

Service Operation Properties

Table 1. Service Operation Properties inputs
Input Name Description
Data Service Select a Data Service to which to add an operation.

Note: If this input appears blank, no Data Services exist in the model. Use the Service Definition builder to create an empty Data Service to which you can add an operation.

Operation Name Enter a name for this operation.

Example: getJanFinancials

Action to Call Specify the action that does the main execution for your operation.

Note: If you are calling an action from an integration builder (such as SQL call or SAP function call), you can select the operation from the Data Services node in the selector.

Operation Description Enter a description of the operation. This text is visible when the service is used in a consumer model.

 

Operation Inputs

Table 2. Operation Inputs
Input Name Description
Input Structure Handling Select the way you want any inputs to your operation to be handled.

Use structure from called action

To use the action input structure. (Available when calling a Data Service Operation (which has a known schema structure) or when calling a method that has one or more simple type arguments.)

Specify input schema

To specify a schema to use for the input.

No inputs

If the operation action does not require or accept inputs.

Note: Methods and data services are handled differently.

Input Schema This input is available when Specify input schema is selected in the Input Structure Handling input.

Use the selector to select a schema to use for the input structure.

Input Description This input is available when Specify input schema is selected in the Input Structure Handling input.

Enter a description of the input schema. This description is displayed in the Service Consumer builder.

Input Field Mapping This input is available if the action you are calling has inputs.

Automatic

To automatically copy your operation inputs into the called action inputs.

Specify input values

To specify the values for each of the called action inputs.
Input Field values This table is available if you select Specify input values for the Input Field Mapping input. All input fields for the called operation are listed in the Name column. Use the Value column to assign values to inputs as desired.

Note: The Arguments node in the value selector lists all the fields from your operation inputs.

 

Operation Results

Table 3. Operation Results inputs
Input Name Description
Result Structure Handling Select the way operation results are handled.

Use structure from called action

Available only when calling a Data Service Operation. When calling a method, you need to specify the result structure.

Specify result schema

To specify a schema to use for the result.

No inputs

If the operation action does not require or accept inputs.

Note: Methods and Data Services are handled differently.

Result Schema This input is available when Specify result schema is selected in the Result Structure Handling input.

Use the selector to select a schema to use for the result structure.

Result Description This input is available when Specify result schema is selected in the Result Structure Handling input.

Enter a description of the result schema. This description is displayed in Service Consumer builder.

Result Field Mapping This input is visible only if your operation has results.

Automatic

To automatically copy the called action results into your operation results.

Specify Result Values

To specify the values for each of your operation result fields.
Result Field Values This input is available if you select Specify result values in the Result Field Mapping input.

All result fields for the called operation are listed in the Name column. Use the Value column to assign values to results as desired.

Note: All fields from the results of the action you are calling are listed in the "Results" section of the value picker.

 

Result Caching

Table 4. Result Caching inputs
Input Name Description
Enable Caching of Service Results Enable to automatically cache the operation results.

Note: This input uses the functionality provided by the Cache Control builder.

Refresh Interval Enter an interval (in seconds) used to refresh service results.

 

Additional Processing

Table 5. Additional Processing inputs
Input Name Description
Pre-Execute Support This input is used to call other code when your operation is executed, just before the called action is invoked.

None

To disable pre-execute support.

Fire Event

To fire an event called operationnamePreExecute.

If you select the generated event in the Event Handler builder, you can see that it takes two arguments, operationInputs and calledActionInputs.

Specify Method

To specify the name of a method for pre-execute handling.
Pre-Execute Method This input is available when Specify Method is selected in the Pre-Execute Support input. Specify the method to run that provides pre-execute support. The method should take two IXml arguments.

  • The first argument is the input structure that was passed to your service operation.

  • The second argument is the input structure that is to be used to invoke the action that the operation is calling (if it takes inputs).
Post-Execute Support This input is used to call other code when your operation is executed, after the called action returns.

None

Disables post-execute support.

Fire Event

Fires an event called operationnamePostExecute.

If you select the generated event in the Event Handler builder, you can see that it takes two arguments, operationResults and calledActionResults.

Specify Method

Name of a method for Post-Execute handling.
Post-Execute Method This input is available when Specify Method is selected in the Post-Execute Support input. Specify the method to run that provides post-execute support. The method should take two IXml arguments.

  • The first argument is the result data from the called operation.

  • The second argument is the result structure that will be returned from your service operation.
Error Handler Method Specify an error handler method to attach to the operation. This method is called when an exception is thrown during operation execution.

Note: The error handler method must take no arguments.

 

Context Variables

Each service operation can declare one or more context variables. These variables in the service implementation control the behavior of the service operation. The caller can optionally supply values.

Table 6. Context Variables input
Input Name Description
Arguments You can use this optional input to publish values that can be referenced in a consumer model (from the Service Consumer builder). Any context values that are specified in the consumer model are then pushed into the corresponding service model instance variables just before the operation is invoked.

Context variables are published using an ID (allowing common, shared types.) The Service Consumer builder looks for published context variables, and allows values to be set for them.

 

Paging Options

Table 7. Paging Options input
Input Name Description
Page Enable Option Select one of these options to support implementing pageable resource solutions.

Default

Uses the setting from the data source. The SQL Call builder and the Domino View & Form builder provide implementations for pageable data resources.

No Paging

If data source is set to paging, use this option to turn off the paging feature.

Page Enable

Supports paging a data resource.

 

Optional Schema Settings

Use this input to control the details of schema generation.

Table 8. Optional Schema Settings input
Input Name Description
Top Element Name Name of the schema element for the top-level generated schema. The default is arguments.

Parent topic: Service Operation builder


Library | Support |