Thursday, April 24, 2008
May be not if you have given it a try. The previous versions of Template builder supplied to PeopleSoft developers do make it look complicated. Try the latest version of template builder 5.6.2+ and you might fall in love with this again.
Get the new template builder from Oracle OTN site as the offering by PeopleSoft application is old.
PeopleSoft and other blogs explain a lot about Query based data source but as we PeopleSoft developers use PeopleCode day in and day out how do we use rowset based data source?
Many question asked about how we create the code to generate data file using rowset based XML Publisher.
1) Create an Application Engine to create sample XSD and XML file
2) I assume you have already installed the plug in for the XML Publisher and worked with query data source.
3) Here we are talking about using PeopleCode to create XML Publisher reports.
4) Create an Application Engine with the below pasted code
5) Use appropriate table and you will have the files (Schema and Sample Data) ready.
6) Use these data sources to create your template. The Business analysts can change these templates as and when client wishes.
7) The templates are effective dated so you can change the template and add it to the report definition without a need of a developer. Run the report and get result in the format you/Client need.
8) Use the above created template in you XML Publisher process definition.
9) The Application Engine so far is only built to provide sample files to create the template.
10) Once the template is built, the developer will update the Application Engine to publish entire data.
11) Good luck!
/* Import the Application Package and define the rowset*/
Local Rowset &rs;
/* CREATE ROWSETS*/
&rs = CreateRowset(Record.PERS*****TBL);
rem &full = createrowset(record.parent, &rs);
&rs.Fill("where emplid like '***%'");
/* Create schema files and Sample data files */
&RowsetDataSource = create PSXP_XMLGEN:RowSetDS();
&rds = create PSXP_XMLGEN:RowSetDS();
&myschema = &rds.GetXSDSchema(&rs);
&f1 = GetFile("C:\temp\schema.xsd", "W", %FilePath_Absolute);
&myxmlfile = &rds.GetXMLData(&rs, "C:\temp\schema.xsd");
&f2 = GetFile("C:\temp\xmlfile.xml", "w", %FilePath_Absolute);
Wednesday, March 21, 2007
Creating Web Services in PeopleSoft
What are the Peopletools 8.48 functionalities for integrating with BPEL? Peopletools 8.48 provides capabilities to consume or provide webservices. The PeopleSoft Applications and BPEL share services and these services are invoked synchronously or asynchronously. We will see in brief how to expose as web services within peoplesoft.
How is a PeopleSoft service consumed by BPEL? PeopleSoft with latest tools release enables developers to expose CI and Application packages as Web Services. The feature in BPEL process which consumes the service is Partner Link.
Consuming a BPEL process was made very easy in Peopletools. The ability to create and consume the webservices is providing in releases 8.46, 8.47 & 8.48. People Tools service designer is used to create and publish webservices. The messaging operations are diverted to Service operations. We are aware of creating messages, message channels and creating nodes and transactions. The service operations is about creating service operations, assigning messages to operations, adding handlers and creating routings.
Let us also take a brief pause and be aware of the new nomenclature.
Prior to 8.46
Message now is only a shape or definition only
Application message system the message node is associated with specific message channels. Each message channel includes the routing. The subscribing system processes the received message by the subscription process. The message delivery is handled through the HTTP/XML protocol. To revise the picture below depicts the components.
Messaging Flow in the service oriented architecture integration.
A service can consume the service by discovering from BPEL’s WSIL, UDDI, or directly importing using wsdl URL, or from a WSDL file. A copy of the WSDL is stored in WSDL repository table. Using the service designer, the developer can select port type, operations and messages. The developer can also add some handlers and routings.
- Create/Identify message and message channel
- Create/Identify service
- Create/Identify service operation
- Create/Identify Routings
The following diagrams explain the navigation to search and create the above mentioned components.
Peopletools > Integration broker – Integration Setup > Message
Fig: New message which is shape only.
Peopletools > Integration broker – Integration Setup > services
Fig: Create new service for the message created earlier.
Peopletools > Integration broker – Integration Setup > service operation
Fig: Create new service operation, message, queue, service and service operations are all related.
Fig: Routings are created for service operations.
Fig: The routings on service operation explains the node information.
Fig: example to find connectors tab on routing definitions.
Peopletools > Integration broker – Configuration > Service Configuration
The settings on the page are used for WSDL and SOAP endpoints, also the schema and service namespace.
Component interfaces are web-services ready in version 8.48. The web service in peoplesoft should be exposed to be utilized by BPEL or ESB. These services exposed enables third party tools and integration utilities to consume.
The services what can be one or more CI’s or Application classes or peoplecode and rowset and non-rowset based messages can be published as a WSDL or UDDI repository. The WSDL is also saved in an internal WSDL repository and available for query or export. This task is accomplished for a developer through web service wizard.
Peopletools > Integration broker – Web Services > Provide web services
Fig: Step 2
Fig: Created is the WSDL URL, you can also create a SOAP template.
Providing CI based Web Services
Peopletools > Integration broker > Web Services > CI based services
Fig: CI based services
Fig: select the CI and click on review CI status
Fig: Select all or any methods and click on display selected actions.
Fig: Click on Perform selected actions
Fig: Click on view service definition. The page displays service information and operations.
Fig: Provide web service gives the user a service wizard to create web service.
Fig: Check if WSDL already exists.
Fig: Click on provide web service. Do select all or any.
Fig: Step 3, you can view the WSDL.
Fig: Finish in the step 4
Fig: Results and you can also create a SOAP Template.
Peopletools > Portal > Structure and content
Fig: make sure the WSRP Producible is checked before exposing as a web service
Easy Coding: The consumed BPEL process can be launched (invoked) using a very few Peoplecode statements.
Creating a Message
&payload = CreateXmlDoc(&customer);
&msg = CreateMessage(Operation.PROCESS, %IntBroker_Request);
Invoking a BPEL process
&response = &bpelProcess.LaunchSyncBPELProcess(&OPERATION, &msg, "", "");
Processing a response
If All(&response) Then
&responseString = &response.GenXMLString();
WinMessage("Error: No reply ");
Monday, March 12, 2007
Set trace off.
Provide a trace of the program as it is executed. This implies options 64+128+256 described in the following rows.
Provide a listing of the entire program.
Show the results of all assignments made to variables.
Show the values fetched for all variables.
Show the contents of the internal machine stack. This option is normally used for debugging the PeopleCode language and not PeopleCode programs.
Provide a trace showing when each program starts.
Provide a trace showing the calls made to each external PeopleCode routine.
Provide a trace showing the calls made to each internal PeopleCode routine.
Show the values of the parameters to a function.
Show the values of the parameters as they exist at the return from a function.
Show each statement as it's executed (and don't show statements on branches not taken.)
Start the timing tracing of the start and end of top-level program evaluations. This is similar to the Trace Start of Programs, but only traced when the call isn't directly from PeopleCode. It traces recursive evaluations, like what happens when a ScrollSelect in a RowInit event causes another recursive RowInit to fire during the outer RowInit. If both Trace Evaluations (32768) and Trace Start of Programs (64) are on (32768+64 = 32832) then all routine calls (functions, methods, get, set for both internal and external PeopleCode to PeopleCode calls) are traced. The resulting trace file can be processed by a program to add up the timings for each routine and separate the in-routine timings from those for called routines.