Author |
Message
|
vishnurajnr |
Posted: Tue Oct 01, 2013 4:44 am Post subject: Delete FTP file if downstream process fails |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
Hi,
WMB V 8.0.0.1
I have a flow which read records from DB, convert to Flat File and send to an FTP location (FileOutput) and Update Database once FTP done successfully.
If my DB Update failed due to any reasons (rare case), I need to delete the file I have just FTPed. The messageflow transactionality will not roll back the FTP in this case.
So I have created a JAVA function to delete the file in case of DB update fail and this is working good.
But Can we achieve the same using any better way? Any additional configuration of FileOutput node or message flow level do this? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Oct 01, 2013 4:51 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Update your toolkit and runtime to a more modern release like 8.0.0.2 iFix 001. You should put compensating logic in your error handler. This is not something that WMB would handle automatically since remote FTP operations are outside the scope of the WMB transaction. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
vishnurajnr |
Posted: Tue Oct 01, 2013 5:00 am Post subject: |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
Thanks lancelotlinc...!!!
Quote: |
This is not something that WMB would handle automatically since remote FTP operations are outside the scope of the WMB transaction. |
I thought it could have been nice if the FileOutput node locks the file FTPed till the flow process ends and shoud be able to revert if the transaction fails.
Quote: |
You should put compensating logic in your error handler |
Yes, I have done the same.  _________________ -------
A man is great by deeds, not by birth...! |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Oct 01, 2013 5:12 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
vishnurajnr wrote: |
Thanks lancelotlinc...!!! |
Your welcome.
vishnurajnr wrote: |
I thought it could have been nice if the FileOutput node locks the file FTPed till the flow process ends and shoud be able to revert if the transaction fails. |
Sounds like a good case for an RFE ! :rfe:
Admins : whatever happened to our request for an rfe emote ? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
vishnurajnr |
Posted: Thu Oct 03, 2013 1:35 am Post subject: |
|
|
 Centurion
Joined: 08 Aug 2011 Posts: 134 Location: Trivandrum
|
How about if we redesign the flow in such a way that the FTP (FileOutput Node) will come as the last process (DB Update will done before FTP).
In this case,
Quote: |
If DB Update failed, it will not proceed to FTP
If FTP Failed, the DB Update should get rollbacked since (If) the DB is XA supported.
|
.
I tried with MySQL DB, and fail/catch attached to Trace node. But the DB update was not rollbacked...!!!
Is MySQL56 is not XA supported with WMB using the ODBC connection? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Oct 03, 2013 3:04 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Quote: |
XA support: For XA connections, the following restrictions apply: On distributed platforms, only DB2 and Oracle are supported. |
_________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
|