Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Best way to handle exception
- This topic has 8 replies, 1 voice, and was last updated 9 years, 1 month ago by
community-content.
-
AuthorPosts
-
-
July 14, 2008 at 2:10 PM #20145
Hi,
My project needs like:
If First Send FTP step would be failed then whole transaction wont execute and control jump over CATCH EXCEPTION shape and execute CATCH EXCEPTION shape and control flow get terminate successfully.
Handling Exception in following scenario.
My message flow is as per following:
1. message receive from LOCAL folder (ex d:\GetXML)
2. Transfer to 3 differet FTP. I put all 3 FTP SEND shape in one scope ( Scope properties synchronized = true and Transaction Type = None ) if any send operation would be fail then i wish control goes to CATCH EXCEPTION shape and send that receive message back to some other local folder.
But Right now if my first FTP sending is failed then control doesnt go to CATCH EXCEPTION shape. Flow just a filed error message in event viewer and send file to remaining FTP server successfully and message flow go into suspended state.
My FTP Physical port Transport Advanced Options configuration as followed.
Retry Count 0, Retry Interval 0, Priority 1, Enable routing for failed messages = false
Please help me to figure out my problem.
Regards,
– Dhaval M.
-
July 14, 2008 at 3:34 PM #20147
Dhaval,
I think you should be using Delivery Notification on your Send Ports here; catch a NACK when the FTP send fails and go to your exception block, then save the message locally.
HTH, Nick.
-
July 15, 2008 at 6:57 AM #20152
Hi Nick,
I appreciate your suggestion and its work fine but stil i face one problem.
Modified orchestration:
1. receive message
2. Start scope -> Send to FTP -> Catch Exception -> send to local -> terminate shape
3. If file send successfully to FTP then flowcome out from scope and send to other FTP server.
But Currente flow: if first FTP is down then flow go to catch exception shape and send file to local folder but flow dont get terminate from terminate shape while orchestration upload file to other FTP server.
I want that process completed from terminate shape. Flow should not go ahead.
One more help i need, i have one expression shape (within i rename my local file ) if file is not there then which kind of exception ll be genereate.
Regards,
– Dhaval M.
-
July 15, 2008 at 7:58 AM #20154
Dhava,
Your terminate shape should be within the Exception Handler for your Delivery Notification exception.
As for the saving of the local file, I would suggest using a Send Port and a FILE adapter to save the file locally, rather than trying to save it using C# in an Expression Shape.
If this doesn’t answer your question, could you elaborate on the points you’re struggling with?
Nick.
-
July 15, 2008 at 8:18 AM #20156
Hi Nick,
Thank you very much to take intrest in my problem.
I have put tarminate shape in CATCH EXCEPTION block itself. Following is the design my orchestration.
1. Receive file from local (Get XML)
2. Map some other schema
3. Start scope -> (withing scope ) send FTP
4. CATCH EXCEPTION -> Send to local folder using SEND shape not expression shape -> trerminate shape
5. catch exception and scope block is over
6 send that file to Local Processed folder. ( Only execute if file uploaded on FTP successfully )
7. Rename one local file Using Expression shape. (If file not exist then catch exception and terminate instance successfully)
I need above flow.
but i just show the message execution flow in HAT report. Below is the flow.
1. Receive file from local (Get XML)
2. Map some other schema
3. Start scope -> (withing scope ) send FTP
4 send that file to Local “Processed” folder. ( Only execute if file uploaded on FTP successfully )
5. CATCH EXCEPTION -> Send to local folder using SEND shape -> trerminate shape
6. catch exception and scope block is over
I dont know why the flow execute unorderly while my “PROCESSED” Folder is after scope and catch exception block.
but it execute first and then flow goes to catch block.
Regards,
– Dhaval M
-
July 15, 2008 at 8:20 AM #20157
In HAT i used Orchesration Debugger to show the original execution flow of orchestration and i was stunned to see this flow.
could you plz help me to figure out this problem.
Regards,
Dhaval M.
-
-
July 15, 2008 at 12:21 PM #20158
Hi Nick,
Thanks for ur kind support now its working fine
I just redeploy my whole application and now its working fine.
I need one suggestion. My client want some report. In that they want get whole file transformation information. Like:
Biztalk file pickup date and time, Is file successfully send or not , FTP Uploaded time , file size , file name etc..
can you please suggest me how can i achive this reports.
Regards,
– Dhaval M.
-
July 15, 2008 at 1:23 PM #20161
Dhaval,
I would probably suggest some form of logging implemented in expressions shapes througout your orchestration; this logging could be to file detailing the information you have included above. When the customer requests the report, simply present them the file.
The file can of course include details of the orchestration, such as instance GUID to aid deciphering on the log.
HTH, Nick.
-
July 15, 2008 at 1:48 PM #20163
Hi Nick,
Ur suggestion is really intresting but they want some report which i can published on their existing site and if whenever they want they just fire a request on that and derive reports from their ( i make report using reporting service and publish on their existing web server.)
So i was asking that can u give me some idea, link or document where i can get all information about how biztalk store internaly message transformation information (Instance information ) on sql server 2005.
I just create BAM view using BAM tool in which i get all information from BAM database table. But this provide me only Successfully Completed transmision information. But if transactions faced some exception. those transmision it ll not store in to that database. i am looking for such kind of information also.
Expected Reports Fields are:
FIle Pick Up time , file name, file size, Successfully send to FTP Status (Yes/No), Rename the file No(Yes/No)…
So they can easily collect those files which has status is “NO” and again put it on FIle pick up folder.
Regards,
– Dhaval M.
-
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.