<variable name="opp" element="ns10:Opportunity"/>
in this case, xmlns:ns10="urn:YOURCOMPANY.enterprise.soap.sforce.com"
This problem has shown up again, although this time in different disguise. There are also extra steps involved to resolve the problem.
Problem: cs90disc only has PSUNX server configured (check under PeopleTools - Process Scheduler - Process Monitor menu, then Server List page). But in the Server Definition tab for PSNT under PeopleTools - Process Scheduler - Servers menu, the various process types are defined to run on this server. It might have been default setting. The important thing to remember is if PSNT is not configured; don't define any process types to run on PSNT.
If there are already existing service operations in the "New" state before you have chance to correct the PSNT settings, you need to cancel the service operation. In the Process Monitor page, you will notice the corresponding process is in "Queued" state, you will need to also change the Run Status to "Cancelled". Otherwise the Application Engine program PRCSYSPURGE will end up in "Error" state since it can't purge the PSPRCSRQST table because it detects some process are in "Initial" state but is not processing.
With the above works, it might still not solve the problem. What I had to do to finally succeed is to Purge Cache of App Server. You will need to go to PSADMIN to do that.
To speed up the testing of batch job, you could go to PeopleTools - Process Scheduler - System Settings menu, System Purge Options page, change the "Next Purge Date/Time" to be some thing close. Then go to PSADMIN to stop/start Process Scheduler.
After just taking the Peoplesoft Integration Broker class, I was eager to get my first hand experience connecting Peoplesoft and ESB together. I found this great instruction on peoplesoft best practice site to get started. (ESB: Publishing PeopleSoft Outbound Sales Order to Enterprise Service Bus found on http://www.oracle.com/technolog
This is a good case study to go through to demonstrate how to wire the Peoplesoft delivered application messages to external system.
Configuring Gateways and activating the Integration Broker Domains are the tasks that only need to be done once. Since I started working with a CRM discovery environment that does not have the Gateway set up before, that was the first thing I did.
CRM9.0 with PeopleTools 8.48 delivers some application messages and the integration points out of the box.
For the published application message CRM_SALES_ORDER, there is already a service and service operation defined with the same name. I just have to make sure the service/service operations are active. CRM_SALES_ORDER message/service use SALES_ORDER_LOAD queue which also already exists.
For the PeopleSoft Integration, we need to configure point to point routing. That includes configuring Node and Routing.
A Node representing ESB system needs to be defined in Peoplesoft. Since we are sending SOAP message out from Peoplesoft, the HTTPTARGET connector is selected.
A Routing is created by specifying sender node as PSFT_CR (default local node) and receiver node as SOADISC (the node ESB runs on). For the HTTPTARGET connector properties, we need to make sure it's SOAPACTION is set to "execute" and METHOD is set to POST. This is because SOAP binding only defines SOAP within HTTP POST requests. In the PRIMARYURL field, enter the same SOAP Endpoint URI that will be created later in ESB.
While configuring the Peoplesoft Integration Broker, I learned a few things.
Process Monitor is a good place to see if all processes fire correctly. In my case, The Process Scheduler was only configured for PSUNX and not for PSNT. I had to manually change all the associated Application Engine Process to run on PSUNX. There was not an obvious way finding out what Application Engine Process was associated with "Add Order" business flow, I had to just experiment. Each time a queued AE process in the process monitor points out some problem. The default scheduler get kick off seems to be PSNT which is the reason why the process didn't get run. Since queued process prevents progressing to next AE program, it took some time before I figure out all the AE process that needs to be configured to go to PSUNX. I suspect there is better way doing this.
By now, we are complete with the PeopleSoft side of configuration. There is still some step to go through in PeopleSoft but the purpose of it is to extracting out the message schema to facilitate creating of ESB project. For this Outbound Async one way wiring PeopleSoft application message to external system, we don't need to create a PeopleSoft Web Service. But we still go through the step to create Web Service next just to take advantage of the "Provide Web Service" function to get the XSD schema of the CRM_SALES_ORDER.
The "Provide Web Service" function generates a WSDL with inline XSD schema for any Service/Service Operation with an "Any to Local" inbound Routing. The steps we need to go through are:
1. Generate an Any-to-Local inbound routing for CRM_SALES_ORDER
2. Generate the WSDL
3. From the wsdl file, copy the part between “xsd:schema...” and “/xsd:schema”
Now we can move onto creating ESB process:
This part of the instruction is clear enough, but there is one thing worth pointing out. When we configure Peoplesoft routing, we supplied the SOAP Endpoint URI that will be created in ESB. What is being entered there has to match exactly what will get generated in ESB. It was not obvious at the first that what you put in when creating ESB System/Group become part of the SOAP URI. The mistake you will make if follow the instruction is that it had you put in "http://your_ip_address:port/event/PeopleSoft/Inbound/ReceivePSFTOrder_RS" in PeopleSoft Connector property setting. Later in the instruction on creating ESB System/Group, it asks you to enter "Peoplesoft" as name. After registering your ESB process, you will notice the SOAP Endpoint URI generated as :http://localhost:port/event/Peoplesoft/Inbound/ReceivePSFTOrder_RS". Notices the one URI spell “PeopleSoft” while the other "Peoplesoft". You could be ended up sitting there wondering why my ESB service is not invoked!
Continued from Part 1:
With not much log message to go on when configuring ESB SFTP adapter, I decided to try BPEL SFTP adapter to see if that yields more hints. The strategy seems to help pinpoint the problem.
Here is the BPEL SFTP error msg in log:
oracle.classloader.util.AnnotatedNoClassDefFoundError in
JCA-work-instance:FTP Adapter-4 - cause:
Missing class: com.maverick.ssh.SshTransport
Dependent class: oracle.tip.adapter.ftp.SshImpl.SshImplFactory
Loader: FtpAdapter:0.0.0
Code-Source:
/C:/oracle/product/10.1.3.1/OracleAS_1/j2ee/home/connectors/FtpAdapter/FtpAdapter/ftpAdapter.jar
Configuration: <code-source> in
C:\oracle\product\10.1.3.1\OracleAS_1\j2ee\home\connectors\FtpAdapter\FtpAdapter
The missing class is not available from any code-source or loader in
the system.
The forums.oracle.com has one entry that mentioned that for Oracle AS B2B package, there is a patch # 6353697 available for getting SFTP to work. It makes one think that it is what I needed too but I got to find the confirmation and the right patch. After setting up access to Oracle Metalink, I came across an entry that points to the patch (# 5852001) I need. Since my SOA window install has different path setup, I have to correct the referred path in the patch before applying it. I am glad the final outcome is a success!
There are more things to try for the File/FTP adapter.
1. Test the Synchronous Read File operation, which reads the current contents of a file.
2. Test different options for when to write to new file. The factors are: Number of Messages, Elapsed Time, and File Size.
3. With FTP adapter, there are different methods for obtaining the modification time of files on the remote FTP server. I am able to use File System command “quote mdtm filename”, I need to experiment with Directory Listing and File Name Substring. For now, there is no time zone issue, since the time zone of the FTP server is same as the SOA instance.
4. We could use Public Key option to connect to SSH server.