Tuesday, August 30, 2011

Overriding of Document Protocol Parameters in B2B

Once we came across a very interesting scenario, wherein we want to have different 'Segment delimters' for different transactions of same protocol revision of same trading partner, e.g
For partner 'ABC ' transaction '894' segment delimter should be 0x7f and for '880' it should be 0x3e.
We followed the below steps-


  • Goto - Remote TP --> Operational Capability --> Respecive Business Action --> Document Protocol Parameters


  • Update the segment delimiter for each Business Action.


  • Re validate and Redeploy the agreement


NOTE:- B2B doesn't allow to set different Document Protocol Parameters for different transactions of same protocol revision and same trading partner. If you change in one of the transactions it will automatically reflect in the other.

We all know that for every EDI transaction, we generate its corresponding XSD(schema) from B2B Document Editor.


To make it work, we need to make use of Internal-properties defined in the transaction's xsd. When you add this xsd in your B2B adapter, you can pass the desired value in any of the document protocol parameters with help of XSLT and this eventually overrides the value set in B2B console at run time.


Regards


Ayush


B2B Batching of transactions not happening

Scenario:- We had to batch all the EDI outgoing transactions for a particular trading partner 's particular EDI transaction. For eg- Lets say we have 100 invoices(810) coming from EBiz/SOA into B2B for trading partner 'A' in one transaction.Now we have to club all the 100 invoices into one EDI file and send it to 'A'.

Problem:- I won't discuss how batching is done in B2B. You can get the complete details in this below link
http://www.oracle.com/technology/products/integration/b2b/pdf/B2B_TN_012_EDI_OutBound_Batching.pdf
We faced an issue where even after applying the logic correctly, the batching was not happening.The transactions remained in the WAIT BATCH state forever in the B2B console.Even if we bounced the B2B server, neither the existing transactions were completed nor the new transactions were batched.
The interesting part was that it was happening only in one of b2b instances because it was working perfectly in another b2b instance which meant that my batching logic was correct.

Cause:- After doing some research in the b2b database, we found that the parameter "job_queue_processes" which specifies the no. of processes allocated to run the "ip_b2b_dbms_job" was significantly low , in fact the value was 0.
This parameter can be seen using sqlplus 'show parameter job_queue_processes'. The sample pl/sql code is as below:
CREATE or REPLACE PROCEDURE ip_b2b_dbms_job AS
x NUMBER;
BEGIN
dbms_job.submit(x, 'B2B_TIMEOUT_PROC;', sysdate, 'sysdate + (1 / 1440)');
commit;
END;

Solution:- We need to increase it's value to 5 or 10 and then bounce the B2B DB and Server.
This worked!!

Regards
Ayush

Wednesday, August 10, 2011

B2B abruptly fails to communicate to the FTP serverr

Scenario:-There was a scenario in my project where we had Inbound transaction 895s configured for a trading partner and we had to send a Functional Acknowledgement(997) back to the TP for each 895 received.

Problem:- We had hundreds of 895s coming at a time into B2B and while B2B was sending 997 for each 895, some of the 997 edi files failed at the FTP Server. That meant some of the 997 edi files failed to appear at the FTP location while the rest of them were successfully created.
Error in the B2B logs-
oracle.tip.transport.TransportException: Unable to read response from host '$FTP HostServer'
java.net.SocketException: Connection reset


Cause:-As problem was very strange because B2B was abruptly loosing connections to the FTP and the FTP server logs were clean too, we couldn't drill down to the exact cause of the problem, so we concluded that this issue is intermittent and the possible cause could be network or environment issue.

Solution:- Since we were not able to do a root cause analysis (even after seeking help from Oracle support) and at the same time we also needed a workaround to come out of this situation, we used the Retry Count facility available at the Delivery channel layer of the TP. By setting the Retry Count and Retry Interval to some specific value,we were actually cutting down the possibility of the connection failure between B2B server and the FTP.

Result :-The B2B was successfully able to connect to the FTP in the one of the retry attempts if it anyhow failed in the previous attempt.
Its better to configure the retry mechanism for each EDI transaction beforehand.

Cheers
Ayush

Tuesday, August 9, 2011

Error while migrating a single agreement in B2B

One of the stiff challenges which i faced is migrating a single agreement in B2B between two environments, suppose from Development environment to Production environment in the below scenario.
Scenario:-
You have Trading partner "A" with some EDI X12 transaction for eg. 850 configured and running in both the environments(dev and prod). Now we have a new transaction suppose 875 for the same partner "A" configured in dev environment and needs to be moved to production.

Now if you migrate this 875 agreement in the conventional way, then it will throw an error in B2B production console while validating the agreement

Error:-
Agreement $TP_Name 875 Inbound is invalid.
AIP-16222: The transport parameter of trading partner $TP_Name must have no more than one protocol endpoint


Reason:-
The endpoint details in both the environments are different.

Solution:-
1. In development environment update the transport server parameters for "$TransportServer" to the same values as production, then re-export the agreement and import it again.
OR
2. In the exported agreement (xml file) modify the IP, username and password for "$TransportServer" transport server to the values you have in production environment.
You may get these parameters by connecting to B2B production metadata repository and running this query:
select * from b2b.TIP_transportserver_t t where t.name="$TransportServer";
Import the xml file in the production server and validate the agreement.
No errors this time!!

Cheers
Ayush

Oracle B2B

Hello guys,
Its been a long time since i have updated with some technical stuff on my blog.Last year i was given an opportunity to work on Oracle B2B which was totally new and challenging to me since being a newbie to it.
Initially i struggled, but soon picked up the pace and was able to explore and learn quite a handful of things which i feel like sharing with all of you.
I was involved in with direct integrations of Oracle B2B with Oracle SOA Interfaces in and out.Also responsible in configuring EDI trading Partners and agreements on various EDI X12 transactions like 850,875,810,894 etc..
In my next posts on b2b, i will neither talk about the configuration and definition of b2b nor the way to integrate SOA with B2B because this is already available in the b2b guides at oracle sites. But i will share some of the crucial situations and key points which i came across in my project and it required some efforts to come out of it.
I hope with my b2b posts many of you will be benefited.
So wait for my next posts, Happy Learning!!!

Thanks
Ayush