This chapter provides an overview of the HCM interface registry and discusses how to:
Manage the HCM interface registry.
Register new interfaces.
Implement registered interfaces.
Consume registered interfaces.
Maintain the registry folder structure.
Test services.
View and register transformation maps.
Map HCM services to Integration Broker.
The HCM interface registry holds all the interface specifications for available services in the Service Oriented Architecture (SOA). It stores contracts from service providers and provides those contracts to interested service consumers. The service provider registers the interface, the consumer locates the interface in the registry and uses the information to bind and execute the contract between the consumer and the provider, as shown in this diagram:
The service consumer finds an interface in the registry and the registry provides the information necessary to bind and execute the service
The service consumer is an application, service, or some other type of software module that requires a service. It is the entity that initiates the location of the service in the registry, binding to the service over a transport, and executing the service function. The service consumer executes the service by sending it a request formatted according to the contract.
The service provider is the service, the network-addressable entity that accepts and executes the requests from consumers. It can be a mainframe system, a component, or some other type of software system that executes the service request. The service provider publishes its contract in the registry for access by service consumers.
To set up and use an interface registry:
Set up the interface contract and register the interface using the Registration Wizard (Setup HRMS, System Administration, HCM Registry, Registry Wizard).
Implement the interface in the providing application.
Set up the consuming application to invoke registered interfaces.
Setting Up Interface Contracts
An interface contract specifies the way a consumer of a service will interact with the provider of the service, including the format of the request and response from the service. The HCM registry is populated with the existing interface contracts within HCM. To add new interfaces to the registry, you must first define the contract between the services.
To define an agreement between services, follow these steps:
Determine the interface details (such as signature, exceptions, and warnings).
Register the interface under the provider object identifier.
Set the interface status to Active.
Note. Register interfaces using the HCM registry's Registration Wizard.
Interfaces fall into one of the following categories:
Services
Synchronous request/response (services)
Services interfaces are procedural invocations and can be local and remote.
Asynchronous publish/subscribe (events)
Events can be notifications (outbound) or consumption (inbound) and are based on messaging and integration points.
sqlViews (views)
Views are read only and are SQL-based.
Types
Types represent the complex data types used in service invocations. The following types are supported for service invocations in API:
Primitives (native PeopleCode data types), such as string, date, number, boolean, hexbinary, and arrays.
Complex types, as defined in the registry or arrays of any complex type.
Note. While you can use all primitive types in service invocations natively, all complex types must be explicitly defined and registered in the registry.
Exceptions
Exceptions are fatal errors that can occur during service execution and require special handling by the PeopleCode program. Service providers must identify exceptions that they believe can occur so that the consumer code can manage the exception.
Define exceptions and register them in the interface registry.
To mange the HCM interface registry entries, use the Service Registry component (HMCR_IFC_REGISTRY).
This section discusses how to:
Register and maintain SOA interfaces.
Use the HCM interface registry.
View WSDL code for registry folders.
Review registry folder audit results.
Review registry and interface details.
View WSDL or XSD code for registry entries.
View RegistryDoc.
Page Name |
Definition Name |
Navigation |
Usage |
HMCR_IFC_REGISTRY |
Set Up HRMS, System Administration, HCM Registry, Service Registry, Service Registry |
Review the HCM registry and modify existing entries. |
|
HMCR_IFC_FLDR_ACT |
Click an interface folder on the Service Registry page. |
Generate and audit the WSDL for a selected interface folder. |
|
HMCR_IFC_AUD_RSLT |
Click the Run Audit button on the <Registry Folder Label> page. |
Review the results of a registry folder audit. |
|
HMCR_WSDL_VIEWER HMCR_IVW_VIEWER HMCR_TYPE_VIEWER |
Click a link under the Services, sqlViews, Types, or Exceptions interface folders on the <Registry Folder Label> page. |
Review registry and interface details about a selected interface. |
|
HMCR_WSDL_RAW_SEC |
Click an interface for a service on the <Registry Folder Label> page, and then click the Show WSDL button, or click an interface for a type or exception, and then click on the Show XSD button. |
View WSDL code for a service registry entry, or view XSD code for a type or exception registry entry. |
Access the Service Registry page (Set Up HRMS, System Administration, HCM Registry, Service Registry, Service Registry).
The registry lists all the content owners and their interfaces in a tree format. Each tree leaf represents a registered interface. Registered interfaces are grouped by interface folders. Click a registered interface to review interface information on the Details page.
Owner Identifier |
Select an owner identifier. The registry displays all interfaces (public and private) defined for the selected content owner in addition to all public interfaces defined by owners other than the selected owner. |
Refresh Cache |
Click this button to manually refresh the cache where services, types, exceptions, and SQL views are stored whenever you make a change to the registry. You must refresh the cache when a definition is modified, added, or deleted. You must also refresh the cache when an external cache has to be imported. |
Generate Registry Doc |
Click this button to generate RegistryDoc for the selected HCM service registry. The system generates RegistryDoc in HTML and provides the View RegistryDOC link for you to access the data. The RegistryDoc enables you to view or introspect the registry without having to open the registry, thus offering a quicker view into the registry. Note. RegistryDoc generation relies on configuration of PeopleTools Process Scheduler and report nodes. You should set the directory that acts as the report repository in a shared mode. |
View RegistryDoc |
Click this link to view RegistryDoc that you have generated. The system opens a new browser window, which displays the registry API content in HTML format. |
Searching the Registry
Use the Search capability to look up a registry when:
You do not know the exact name for or the navigation to the service, sqlView, type, or exception.
You want to search for the descriptions for a specific word or pattern of a word.
Search Descriptions |
Select this check box to search descriptions of registry entries for an exact word that you specify in the Search Filter field. Select this check box and the Search Descriptions check box to search descriptions of registry entries for the word pattern that you specify in the Search Filter field. |
Wildcard Search |
Select this check box to search registry entries for the word pattern that you specify in the Search Filter field. Select this check box and the Search Descriptions check box to search descriptions of registry entries for the word pattern that you specify in the Search Filter field. |
Search Filter |
To search registry entries for an exact match of a service, sqlView, type, or exception, enter a value in this field without selecting any check boxes. The system lists the registry entry. To search registry entries for a word pattern, enter the word pattern in this field and select the Wildcard Search check box. The system lists registry entries that match the pattern that you entered. To search descriptions of registry entries for an exact word, enter the word in this field and select the Search Descriptions check box. The system lists registry entries with descriptions that contain the exact word. To search descriptions of registry entries for a word pattern, enter the word pattern in this field and select both the Search descriptions and Wildcard Search check boxes. The system lists registry entries with descriptions that match the pattern that you entered. |
Search |
Click this button to retrieve the registry entries that match your search criteria. |
Link |
Click the link to access the details of the registry. |
Access the <Registry Folder Label> page (click an interface folder on the Service Registry page).
Use the View WSDL group box to review the WSDL that the system generated for the selected registry folder. Click the Run Audit button to run an audit on the registry folder. The system displays the Audit - <Registry Folder Label> page for you to review the results of the registry folder audit.
Access the Audit - <Registry Folder Label> page (click the Run Audit button on the <Registry Folder Label> page).
Access the Interface Registry - Details page (click a link under the Services, sqlViews, Types, or Exceptions interface folders on the <Registry Folder Label> page).
Note. The Interface Registry - Details page is slightly different for each type of interface (services, sqlViews, types, and exceptions).
Registry Details
IUD |
The IUD is the interface's unique identifier for a service within the registry. The system generates this identifier. |
Locate By |
The system automatically displays this value where applicable. |
Version |
Each registry entry has a version type. You can have multiple versions of an entry when you require multiple version of an interface. |
Status |
An interface can have one of the following statuses within the registry:
Note. The status of an interface is specific to the entry version. |
Scope |
This field indicates who can reference this version of the interface:
|
Generate Consumer Code |
Click to generate the consumer stub code for this registry entry. Use this code to implement the service. |
Generate Provider Code |
Click to generate the provider stub code for this registry entry. Use this code to implement the service. |
Show WSDL |
Click this button to generate Web Services Definition Language (WSDL) code for the service registry entry. WSDL code provides you with all the details about the service that is needed for consuming a service. The system displays the <Registry Entry Name> page where you can view the WSDL code. Note. Definitions for sqlViews, types, and exceptions do not have WSDL viewing capability. |
Show XSD |
Click this button to generate XSD code for a type or exception registry entry. XSD code contains the definition of a particular type, which is information that is necessary for consuming complex types. The system displays the <Registry Entry Name> page where you can view the XSD code. Note. Definitions for services and sqlViews do not have XSD viewing capability. |
Run Audit |
Click this button to run an audit of the selected registry folder. Audits ensure that the registry is clean. They also enable you to monitor discrepancies between implementation and contracts. The system displays the Audit - <Registry Folder Label> page, where you can review the results of the audit. |
Interface Details
Interfaces are defined using an XSD schema. The schema for each interface type is stored in the registry. The system generates the schema during registration.
Note. The schema defines the details of sqlView interfaces, not the database view that implements the view interface. The database view must match the properties defined in the schema.
Service interface types have operations called DoServices. A DoService has one or more input, output, and outfault element and each element is defined by either one or more simple or complex type.
Exception Details
Review a service interface's exception details and the associated messages.
Implementation Details
In the Implementation Details group box, review the fully qualified application class path that implements class for this type or exception. The class path includes a branch indicating the version of this type. The version attribute of the registry entry must match the version in the class path of the type class.
Note. For sqlView interfaces, the Implementation Details box displays the database view implementing the interface view.
Note. All exceptions must extend the class baseException, which extends the PeopleTools built-in exception class.
Access the <Registry Entry Name> page (click an interface for a service on the <Registry Folder Label> page, and then click the Show WSDL button, or click an interface for a type or exception, and then click on the Show XSD button).
To view RegistryDoc, click the Generate Registry Doc button on the Service Registry page. The system generates the RegistryDoc and displays the View RegistryDoc link.
Click the View RegistryDoc link. The system opens a new browser window, which displays the registry API content in HTML format.
The page contains three frames. The upper left frame lists the root packages within the RegistryDoc. Click a link for a root package in the upper left frame to view for a list of all of the services, sqlViews, types, and exceptions that are associated with the selected root package. The system displays the details of the selected root package within the lower left frame. The right frame displays the services, sqlViews, types, and exceptions for all root packages.
Click a link in the lower left frame or the right frame to view service, sqlView, type, or exception details.
From a service details page, click on the View WSDL link to view WSDL code for the selected service.
If a service or type refers to another complex type or exception, click on the type link on the details page to view type or exception details.
To register new interfaces, use the Registration Wizard component (HMCR_WZ_REGSRV).
This section discusses how to:
Enter interface information in the Registry Wizard.
Enter interface specifications.
Implement the interface.
Page Name |
Definition Name |
Navigation |
Usage |
HMCR_WZ_STEP1 |
Set Up HRMS, System Administration, HCM Registry, Registration Wizard, Registry Information |
Enter information about a new interface. |
|
HMCR_WZ_STEP2 |
Set Up HRMS, System Administration, HCM Registry, Registration Wizard, Interface Specification |
Enter details about the new interface. |
|
HMCR_WZ_STEP3 |
Set Up HRMS, System Administration, HCM Registry, Registration Wizard, Implementation |
Complete the registration of the new interface by implementing the interface. |
Access the Registry Information page (Set Up HRMS, System Administration, HCM Registry, Registration Wizard, Registry Information).
Type |
Select the interface type. Note. The pages in this component and the information you enter can vary depending on the type of interface you select here. |
Name |
Enter a meaningful name for the interface using the following guidelines:
Note. Users see the name you enter here on the registry tree so make sure that the name is clear and meaningful. |
Version |
Indicate the interface version using the format n.n. You can have multiple active versions of an interface. |
Status |
Select the status of this version of the interface:
|
Object owner identifier |
Select the interface provider. |
Scope |
Indicate if the interface is Public (available to everyone) or Private (available only to the provider application). |
Select parent folder |
Click this link to access the registry folder structure and select the folder within which the new interface will reside. Group interfaces by feature. |
Access the Interface Specification page (Set Up HRMS, System Administration, HCM Registry, Registration Wizard, Interface Specification).
Note. The system displays a different version of this page depending on what type of interface you're registering. See the Registering Services section for information on how to use this page to register service interfaces.
Initialize from Implementation |
If you are basing the Interface View definition on an interface that has already been implemented, click Initialize from Implementation and select the view. The system populates the elements with the fields from the fields in the view's record. Note. The system only displays this link when you register Interface Views. |
Seq Nbr (sequence number) |
Indicate the order in which the element should occur. |
Element Name |
Enter the element name. An element is a property of the interface. Element names must be one word, mixed case, and self-describing. Note. If you are implementing an Interface View, you must add an element to correspond with each field in the view's record. Note. Service interface elements are descriptive items that identify the parameter in a given position. While the position of the elements must correspond to a parameter, it does not have to be a PeopleSoft field name. |
Type Category |
Select the element category. Categories indicate whether the element's data type is simple or complex. A simple datatype is a system-delivered data format. Complex datatypes reference other interface types already in the registry. Note. Always select Complex for Exception elements. Note. The system selects Simple for Interface Views and this field is unavailable for entry. |
Simple Type |
If the element is simple, select the element's system-delivered data format type:
|
Complex Type |
If the type is complex, select the registered element to which it refers. Note. If the interface is an exception, you must select ExceptionType from the Service Framework folder. |
Minimum Occurrences |
Indicate the minimum number of times this element can occur. Select 0 if the occurrence is optional and 1 if the element must occur at least once. Note. You must select 1 for Exception elements. |
Maximum Occurrences |
Indicate the maximum number of times the element can occur. Note. You must select 1 for Exception elements. |
When you register a service, enter the follow information in the four group boxes:
DoService Request
When a service interface will be used to request information, use the fields in this grid to define the service's request parameters.
DoService Response
When a service interface will be used to respond to requests for information, use the fields in this grid to define the service's request parameters.
Exceptions
List all of the exceptions defined for the service interface. You can only select exceptions that have already be added to the registry.
Warnings
List all of the warnings and messages that could be logged during the execution of the service and that are meaningful to the consumer.
Access the Implementation page (Set Up HRMS, System Administration, HCM Registry, Registration Wizard, Implementation).
Note. The system displays a different version of this page depending on what type of interface you're registering. See the Registering Interface Views section for information on how to use this page to register interface views.
Deployment and Deployment Node |
The system displays this field only when you register a Service interface. Indicate if the service is Local (resides in the same database as the consumer) or Remote (resides outside the consumer's database). If the service is remote, select the deployment node. |
Package Root |
Select the provider's root package. The root suffix depends on the interface type you are registering:
|
Class Path |
Select the class path to the appropriate version of your type class. |
Implementation AppClass |
Once you have implemented the class, return to the registry to select the interface's application class. Do not select a value when you initially register the interface; wait until you have implemented the interface. See Implementing Registered Interfaces. Note. If you are implementing a Service interface, populate this field only if the service is local. |
Generate Class Code |
Click to generate the PeopleCode for the implementation AppClass. You can copy and paste the code into your application class object when you implement the interface. See Implementing Registered Interfaces. Note. The system does not display this button when you register Service interfaces. |
Register |
Click to register the interface definition. When the system successfully registers the definition it will display the interface's IUD. |
Registering Interface Views
Interface View |
After you have implemented a sqlView for this interface, return to this page and select the view that corresponds to this Interface View. |
Related Language Interface View |
The system displays the related language view defined in for the implementation in Application Designer, if one exists. |
After you have registered the interface, implement it in the providing application. The providing application must implement the interface accurately so that the consumer application does not encounter any unexpected behavior.
This section discusses how to:
Implement types.
Implement services.
Implement exceptions.
Implement SQLViews.
To implement a registered type interface:
Note. Implement registered types as PeopleCode application classes.
In Application Designer, create an application package for each functional module using the naming convention <NAMESPACE_PREFIX>_TYPES.
Use the first level sub-package to group implementation classes by function and the second level to group classes by versions.
Create the application class that is implementing the interface type.
When you create the application class, you must ensure that it:
Extends the baseType class.
Imports the package with the baseType parent class definition.
Exposes a read-only property IUD with the type string.
Has a IUD property that contains the correct IUD of the corresponding registry entry.
Instantiates any array properties defined in the class as array properties with 0 elements.
Implements the following mandatory public methods: toXmlNode, toXmlNodeString, fromXmlNode, and truncateType.
Copy the stub code the system created when you clicked the Generate Class Code button on the Registry Wizard - Implementation page for this interface and paste it into the application class implementing the interface type.
The generated type stub code includes the following mandatory methods:
method toxmlNode(&parentNode As XmlNode); method fromXmlNode(&parentNode As XmlNode); method toXmlNodeString(&nodeName As string) Returns string; method TruncateType();
The system uses the XML mandatory methods to marshal and unmarshal the type to or from an xml representation, which is required in order to use this type in a remote service invocation. The truncateType mandatory method resents the value of all type elements.
Access the registry entry for the type interface in the Registry Wizard and add the application class to the type's implementation details.
Consumer programs cannot directly instantiate service implementation classes. Due to late binding and remote procedure call support, the framework delays the resolution of the implementation class name until run-time so the only information available to service consumers during design is the interface name.
At run-time, the service manager resolves the interface name into the implementation class name using the registry lookup functionality. Depending on the implementation details defined in the registry, the service manager will return to the consumer either an instance of a local implementation class or a proxy class for the remote implementation.
Because of these considerations, the providing application needs to supply the following two application classes to fully implement a service:
An interface that consumer applications can refer to during design.
An implementation class that the service manager can bind to during run-time.
Note. Implement registered services as PeopleCode application classes.
To implement a registered service interface:
In Application Designer, create an application package for each functional module using the naming convention <NAMESPACE_PREFIX>_SERVICES.
Use the first level sub-package to group implementation classes by function and the second level to group classes by versions. Use the third (application class) level to define an interface and an implementation for the service.
Create two application classes to implement the service, an interface and an implementation class.
Select the registry entry for this service and click the Generate provider Code button. The system displays a page with three group boxes containing code:
Interface peoplecode
Copy and paste the interface PeopleCode into the interface application class.
Implementation peoplecode
Copy and paste the implementation PeopleCode into the implementation application class. The implementation code generated is only a skeleton the actual logic for the application class. The development team must therefore modify the implementation class to meet the providing application's needs.
Proxy peoplecode
Confirm that the interface and implementation classes contain the necessary information.
The two applications serve different functions. The interface class is an abstract definition and details what methods and properties the implementation class will have to have to comply with registered specifications, but it does not contain the implementation details. The implementation class actually implements the interface, providing the executable code for the abstract method definitions.
The interface application class must:
Have names identical to the name of the registered service.
Extend the baseService class.
Imports the baseService parent class definition.
Contain a constructor method that creates an instance of the parent baseService class.
Define an abstract DoService method with the signature matching the signature of the registered service.
Confirm that the implementation of the service:
Implements the interface.
Provides a concrete implementation of the DoService method.
When a development team decides to provide a service, they create an interface and implementation class that implements it.
Imports the interface that it implements, as well as the types and exceptions it is working with.
This happens once you generate the provider code.
Throws exceptions in accordance with the registered interface contract in order to handle errors.
Can log warnings in accordance with the interface contract.
The interface application class provides details of all warnings that were generated when the service was executed.
Uses the API2CI framework to abstract from the component interface specifics, if the implementation is component interface-based.
Component interface-based services need to import the CI library (which is provided with the registry) using this code:
import HMCR_API2CI
If you are using a DoService method, you need to declare two local objects: ciHandler and ciIdent. ciHandler is the class managing all access to a component interface since you cannot directly manipulate a component interface. ciIdent defines the unique attributes of each ciHandler instance.
Access the registry entry for the service interface and add the implementation application class to the type's implementation details.
Note. You can use services to organize multiple other services to execute an business task. This is called aggregating services. The aggregating service is the service responsible for managing the business transaction, housekeeping, and performing the save professing so these processes are run only once, improving overall performance. When a service is running another service in aggregation mode, the calling service (the aggregating service) sets the RunAggregated flag on the called service, causing the called service to skip the housekeeping and save processing.
PeopleSoft delivers a baseException class providing the default exception handling, which is on the PeopleTools exception class. The baseException class constructor takes the following parameters:
An instance of a service log.
A message set number and message number.
Default message text.
Message parameters 1–5 or "Null" when none.
The base Exception class constructor executes the following logic:
Adds PSMessages collection to the service log.
Creates a PeopleTools exception for the provided message set and message number.
To implement a registered type interface:
Note. Implement registered exceptions as PeopleCode application classes.
In Application Designer, create an application package for each functional module using the naming convention <NAMESPACE_PREFIX>_EXCEPTIONS.
Use the first level sub-package to group implementation classes by function and the second level to group classes by versions.
Copy the stub code the system created when you clicked the Generate Class Code button on the Registry Wizard - Implementation page for this interface and paste it into the application class implementing the exception.
Confirm that the exception implementation contains the following:
A link to an entry in the PeopleTools message catalog.
Default error processing.
Exception-specific error processing, where necessary.
Note. The exception's registry entry defines the exception name, the fault message structure, and the exception semantics (description).
Confirm that the implementation of the exception class:
Name is identical to the registry entry name.
Extends the baseException and import the baseException class definition.
Contains a constructor that:
— Takes an instance of a LogType as a single parameter and imports the LogType class definition.
— Facilitates the default error processing by wan of an instance of a parent class.
— Assigns the correct IUD of the corresponding registry entry to its IUD property.
Exposes a read-only property IUD with a type of string.
To implement a registered sqlView interface:
Note. Implement registered sqlView interfaces as PeopleSoft record definitions with a type of view.
Create fields on the record definition to correspond to each field in the registered sqlView interface.
Run SQL Create to create the view in the database.
Open the sqlView registry entry and add the implementation record name to the registry entry.
When you are creating a new interface view, you must use the Registry Wizard component. When you are updating an existing view, you must use access the registry and click the Update button. The system then displays the Registry Wizard component.
This section provides an overview of registered interface consumption and discusses how to:
Invoke service interfaces.
Set up stale data checks in service calls.
Pool component interfaces.
Consume collection-sized interfaces.
Bind complex types to and from portal pages.
Consume SQLViews.
If there is an interface in the registry that your application needs to use, you must create code in PeopleCode events in the consuming application to invoke the interface.
Note. You can click the Generate Consumer Code button on the Registry Details page for the registered service to generate all the code the consuming application needs. Cut and paste the code into the consuming application's PeopleCode Event (for example, SavePostChange PeopleCode). Confirm that the generated code meets the criteria set out in these steps and make any necessary modifications.
Note. You can only place the code for manipulative services such as Set, Add, or Delete in the SavePostChange PeopleCode of a single field in a component. You cannot spread out manipulative service calls over several PeopleCode events. You must also not place manipulative service calls in FieldChange PeopleCode.
Consuming applications invoke service interfaces in four steps:
Import, declare, and create framework classes, service classes, and type classes.
Bind to the service implementation using the Service Manager's LocateService method.
At runtime, the Service Manager determines the appropriate implemented interface application class and returns an instance of it to the consuming application for invocation as follows:
The import statement in the consumer code indicates which registered interface is required.
The registered interface contains information about which implemented interface class is required.
The Service Manager's LocateService method returns an instance of the implementation class.
Note. The LocateService method requires the service name and the service version in order to bind to the appropriate service.
The consumer code only needs to know which registered interface it is using. The provider application specifies which implemented class should be returned to the consumer. This enables the provider to make changes to the implemented interface without impacting the consumer.
If you are invoking a type interface, the consumer application needs to set the properties of the type class in the input parameters prior to passing it to the DoService call.
The type interface registry entry describes the properties of the type class. The consumer can map properties individually from the consuming application to the type class properties.
Invoke the DoService method of the service implementation class, passing the parameters as defined in the service signature.
The service signature defines the zero or more input and output parameters that need to be passed to the service. Parameters can be simple types (such as string, number, date, or boolean) or complex types defined and registered as types in the interface registry:
When the service requires complex types as parameters, the consumer needs to import the type class, declare it as a local variable and instantiate it using the Create instruction.
When the service requires simple types, the simple types only need to be declared by the consumer.
Catch and manage exceptions.
The consumer code must invoke all services within a try-catch block. All code executed in between the try and the catch statement is in a protected area so that any exceptions thrown during service execution will immediately return control to the catch statement in the consumer code. The consuming application can then react to the exception.
The consumer code can catch specific exceptions or the baseException, which is the parent class to all registered exceptions.
Note. The consuming code should always catch for baseException to catch exceptions not specific to the service.
Analyze the service execution log for relevant information.
During service execution, the registry framework collects all warnings and messages issued by the provider and exposes them to the consumer as a service execution log. The consumer can query the execution log and take action based on the warnings and messages, if necessary.
Each service has a property called ExecutionLog. The property has an array of LogType called Log. The LogType has the following attributes:
DEFAULT_TEXT
MESSAGE_SET_NBR
MESSAGE_NBR
MESSAGE_SEVERITY
The service's Log class has a generic method ShowLog() to display the content of the execution log.
Note. All consumer PeopleCode runs within the scope of a consumer component session. Any services that the system invokes during the component runtime will also run within this transaction scope. If the service execution encounters fatal errors, the system will roll back the entire component transaction unless the errors are specifically caught as exceptions. For example, if the a component in the consumer application uses two services invoked by the SavePostChange PeopleCode and one executes successfully while the other throws a fatal error, the system will not save any data to the component from either service.
If the service call is updating the component in the consumer application with an action of Add, you do not need to set up a check for stale data and you can invoke the service in Component.SavePostChange PeopleCode..
However, if the service is to update prior selected data, you need to set up a stale data check to ensure that the underlying data has not been modified during user interaction on the consumer side. To do this, create a Get service in the Component.PostBuild PeopleCode and a Set service in the Component.SavePostChange PeopleCode.
If the registry detects a discrepancy in the data, it will cause an error, which can be caught using baseException.
Several services may use the same instance of a component interface in their implementations. To improve performance, you can pool component interfaces. Component interfaces must be scoped to one local PeopleCode event, but within that event the code can send several calls to services using the same open component interface.
The system then passes the component interface pool to the Service Manager's LocateService method. If a requestor is only issuing one service call in a Peoplecode Event, the system passes NULL as a component interface pool.
You can set up services to operate on items or on collections (row sets). If the consuming application is working with a collection of rows, you must set up the consuming application to pass the entire collection to the service. The service removes any items that are not passed into the service in the collection. If consumer passes an empty collection, it will effectively remove all the data rows in the provider implementation.
Use a collection-sized Get service to populate the collection type class, manipulate it, and pass it back to the Set service.
All services work with simple or complex types as parameters. Simple types are available as PeopleCode data types. The provider application implements complex types as application classes. It is not possible to view application class properties directly on a page so it is necessary for the consumer application to create pages based on Rowset.Row.Record.Field objects and map the type class properties to the fields.
In the consumer code, set up a call to the helper method PopulateToRowset to bring all data from the type class instance to the user interface of the consumer component. Set up a call to the helper method PopulateFromRowset to bring all values from the rowset used in the user interface of the type class.
Note. Not all type classes provide helper methods and not all helper methods will work in all consumer components. In these cases, you will need to write your own logic to bind the type class values to the consumer user interface.
Consuming applications can use registered sqlViews directly without binding. Use registered sqlViews for the following:
Search views.
Prompting.
Related display.
To administer the HCM interface registry, use the Administer Service Registry component (HMCR_CONTENT_ADMIN).
This section discusses how to maintain the registry folder structure.
Page Name |
Definition Name |
Navigation |
Usage |
HMCR_CONTENT_ADMIN |
Set Up HRMS, System Administration, HCM Registry, Administer Service Registry, Administer Service Registry |
Add or delete folders from the registry. |
Access the Administer Service Registry page (Set Up HRMS, System Administration, HCM Registry, Administer Service Registry, Administer Service Registry).
Create Folders
To create a new folder, select Create Folder in the Operation field and enter the folder's registry details.
Folder Label |
Enter the folder label that will appear in the registry. |
Owner ID |
Select the folder content's owner ID from the list of options. |
Final Level |
Indicate if the folder is a final folder. A final folder can not have any child folders other than the folders for the four interface types. If you make this folder a final folder, the system will create the four interface folders. If you leave this check box deselected, the folder is a feature folder and you can add child folders to it. |
Create Tree |
After you have entered the folder details, click the Create Tree button. When you click the button the system generates a new registry tree. Navigate through the tree and select the node under which the new folder should go. You can only place a new folder under folders that have the same owner ID and that are not final level folders. |
Delete Folders
To delete a folder, select Delete Folder in the Operation field. Expand the registry tree, locate the folder you want to delete, and click on it. You cannot delete a folder that contains registered interfaces within one if it's child folders.
To test newly created services, use the Service Tester component (HMCR_SRV_TESTER).
This section discusses how to test services.
Page Name |
Definition Name |
Navigation |
Usage |
HMCR_SRV_TESTER |
Set Up HRMS, System Administration, HCM Registry, Service Tester, Service Tester |
Test newly created services in this generic component. |
Access the Service Tester page (Set Up HRMS, System Administration, HCM Registry, Service Tester, Service Tester).
Use this page to test newly created services through a generic component. For example, if you create a new service using the Registration Wizard component and the corresponding implementation code, you can use this page to test the service and ensure that service you are committing works as designed. The system returns the results of the service test in a new window as XML.
Add, Correction, or Update/Display |
Select the mode that the service will run in. You can use these options to test the service running in the various modes. |
Use Tree Input and Use XML Input |
Select to populate inputs using an XML format (SOAP 1.2) or using the tree structure. When you click the Use XML Input button, the system converts the tree inputs to the corresponding SOAP document. This is useful for testing remote services, for populating the inputs of a larger service, and for copying an existing service to a new service test (similar to "save as" functionality). |
Use Input Parameters as Output |
Select this check box for services which have no input parameters but do update the input parameters that are passed in. This is valid only for local services because remote services cannot update inputs by reference. It is not recommended for local services but can be used where local services where this situation exists. |
Run Service |
Click this button to invoke the service request after you have populated the inputs. Upon completion of the service call, the system displays the outputs of the service in a new window as XML. |
To view transformation maps, use the Transformation Registry component (HMTF_TRF_REGISTRY). To register transformation maps, use the Register Transformation Map component (HMTF_WZ_TRF).
This section discusses now to:
View transformation maps.
Register transformation maps.
Page Name |
Definition Name |
Navigation |
Usage |
HMTF_TRF_REGISTRY |
Set Up HRMS, System Administration, HCM Registry, Transformation Registry, Transformation Registry |
View HCM transformation maps. |
|
HMTF_WZ_STEP1 |
Set Up HRMS, System Administration, HCM Registry, Register Transformation Maps, Register Transformation Map |
Create transformation maps for messages from one message version to another. |
Access the Transformation Registry page (Set Up HRMS, System Administration, HCM Registry, Transformation Registry, Transformation Registry).
Use this page to view details of transformation maps, which instruct the system to convert incoming messages (From) into (To) a specific format. Primarily this is done because, between release, the record definitions may have undergone a change.
Access the Register Transformation Map page (Set Up HRMS, System Administration, HCM Registry, Register Transformation Map, Register Transformation Map).
When you need to exchange information between two different release of a PeopleSoft Enterprise product you must perform transformations. With each release record definitions sometimes undergo changes. Transformations enable you to scale these problems by transforming messages from one release to another. Use this page to create transformation maps for messages from one release to another and from one version to another.
Message Name |
Select the message that needs to be transformed from one version to another. |
Message Version |
Select the version of the message that needs to be transformed for one version to another. |
Application Release |
Select which PeopleSoft Enterprise application release that the message belongs to. For example, specify whether the message is from the HRMS 8.3 system or the HRMS 8,8 system. The Default value is that the system use the current release of the product. |
Transaction Type |
Select the type of transaction of the message, either Inbound Asynchronous, Inbound Synchronous, Outbound Asynchronous, or Outbound Asynchronous. |
Object owner identifier |
Select the owner of the message object. |
IUD |
The system displays a unique identifier for the transformation. The system generates this identifier. |
Transformation Definition |
View the definition of the transformation in XML format. |
Register |
Click this button to register the transformation. |
This section provides an overview of HCM service mapping to Integration Broker and discusses how to:
Map HCM services to Integration Broker.
Delete mapped services.
Use Integration Broker to provide web services.
You can invoke HCM services from remote (non-PeopleSoft) systems. The SOA framework contains built-in functionality to process an incoming requests (services) and return the required response. This built in functionality gives you the ability to:
Generate a web service automatically.
Publish WSDL to the PeopleSoft repository.
Publish WSDL to UDDI.
Synchronize Integration Broker services with the Integration Services Repository (ISR) automatically.
PeopleTools Integration Broker serves as the transport mechanism for services. By mapping your HCM services to Integration Broker, you ensure that your Service Registry conforms to industry standards.
This section discusses how to:
Map an HCM Interface Registry folder to an Integration Broker service.
Map an HCM service to an Integration Broker service operation.
Map interface details.
View service operation security.
View service operation handlers.
View service operation routings.
Mapping an HCM Interface Registry Folder to an Integration Broker Service
Initiate the mapping of HCM services to Integration Broker through the HCM Interface Registry. The system permits mapping at only third level folders, which are the lowest sub-categorization of HCM services for products.
To map the HCM Interface Registry metadata for a particular folder to an Integration Broker service:
Click the folder name link on the Service Registry page for a third level folder.
The system displays the WSDL for that registry folder.
Click the Add to service repository button to add to the service repository.
Provided that you have set up Integration Broker, the system displays details of the service.
Note. The Delete from service repository button is available only when you have mapped the registry folder to the Integration Broker service repository, at which time the Add to service repository button becomes unavailable. This ensures that you can only perform the correct action.
The system automatically generates an Integration Broker service name for the folder. This service name is the IUD for the folder, which is unique string within the HCM Interface Registry and thus guarantees that each service has a unique name. Optionally, you can rename the Integration Broker service to give it a more meaningful name through the Service Administration component (PeopleTools, Integration Broker, Service Utilities, Service Administration). If you rename the service, the system still guarantees a unique name because the Service Alias field contains a copy of the IUD service name. This ensures that the delete process has a means of correlating the service with the HCM Interface Registry.
Note. Do not change the Service Alias field under any circumstances because it is critical to service delete processing.
Mapping an HCM Service to an Integration Broker Service Operation
Each HCM service that is in a registry folder on the Service Registry page is mapped to an Integration Broker service operation and can be found in the service that you have generated for the folder on the Services page (PeopleTools, Integration Broker, Integration Setup, Services). The system uses the name of the HCM service as the name for the service operation, unless that service operation already exists. If the service operation does already exist, an algorithm works within the length constraints of the Service Operation Name field (30 characters). The algorithm replaces the endmost characters with digits until it generates a unique name. The system retrieves the version for the service operation from the HCM Interface Registry.
Mapping Interface Details
The system maps each input and output interface to an integration Broker non-rowset based message, complete with generated schema. The system also assigns the version from the HCM Interface Registry. The base name for the messages is the HCM service name plus the suffix _IM or _OM to designate input or output interfaces, respectively (for example, ADDPOITYPE_IM) .
The system maps outfault interfaces to Integration Broker non-rowset based part messages. This is due to the limitation of Integration Broker having only one fault message per service operation. Therefore, the system creates all outfaults that are associated with a mapped HCM service within an Integration Broker container message. The system indicates outfault messages by using the suffix _FM (for example, ADDPOITYPE_FM).
Viewing Service Operation Security
The system assigns each service operation that you generate the standard HCSPSERVICE permission list. Access the permission list details for the web service on the Web Service Access page (PeopleTools, Integration Broker, Service Operations, General, click the Service Operation Security link).
Viewing Service Operation Handlers
The system assigns a handler to each service operation that you generate. The assigned handler references a generic handler class that is processing the incoming request, and generates the required response. The generic handler is HMCR_FRAMEWORK:IB_Framework:Handlers:IB_SyncRequestHandler. Access handlers for service operations on the Handlers page of the Service Operations component (PeopleTools, Integration Broker, Integration Setup, Service Operations).
Viewing Service Operation Routings
Within the HCM Registry there is no indication of consumers for a given service, so the system does not generate routings during the mapping process. It is up to the development teams to create the necessary routings.
Use the Service Registry to delete HCM services that you have mapped to Integration Broker. The system makes available the Delete from service repository button in the Service Registry only for folders that you have already added to the Integration Broker metadata.
The delete process removes the following objects from the Integration Broker metadata:
WSDL
Services
Service operations
Service operation security
Service operation handlers
Service operation routings
Messages (input, output, fault container, and part)
Message schemas
One main reason for mapping HCM services to Integration Broker is to use Integration Broker's capability of providing web services. You can provide a web service only for service operations that you define as having any-to-local routing. You create these service operations, along with their handlers and routings, in the Service Operations component.
To set up any-to-local routings for service operations:
Access the Service Operations component (PeopleTools, Integration Broker, Integration Setup, Service Operations).
Select the Generate Any-to-Local check box in the Routing Actions Upon Save area of the General page.
Save the component.
The system updates the Any-to-Local value of the Routing Status area to Exists.
The system also generates the routing and displays it on the Routings page of the component.
You can publish as a web service any service that has at least one service operation defined as any-to-local.
To publish a qualifying service as a web service:
Access the Provide Web Service component (PeopleTools, Integration Broker, Web Services, Provide Web Service) to launch the Provide Web Service Wizard.
The system displays the Select Services page.
Search for the service that you wish to publish as a web service.
Select that service in the returned search results, and then click the Next button.
The system displays the Select Service Operations page.
Select the service operation for the service that you want to publish as a web service, and then click the Next button.
The system displays the View WSDL page.
Click the View WSDL link for a service to view the WSDL that the system generated for the service.
Return to the View WSDL page and click the Next button.
The system displays the Specify Publishing Options page.
Define where to publish the selected services.
Select the Publish to UDDI check box or the WSDL Repository check box to publish the services to the corresponding location.
The system displays the Provide Web Service - Results page.
View the WSDL generation log to confirm the results of the wizard.