cancel
Showing results for 
Search instead for 
Did you mean: 

updating db table of other database

jrady
Champ in-the-making
Champ in-the-making
Hi, first of all i apologize if this has been asked before
(i did think so, but could not find any matching topics)

I would like Alfresco to update a 3rd party database based on folder actions (add a node, update a node, delete a node etc).
what do i have to do for this?

i assume i need to write some code to encapsulate my sql statement
and then attach this code to a folder watch attribute?

or am i waay off with this approach ?



thanks,
Joe
1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator
Hello,

basically, that is how you would do it. I'd use a policy or action (or both in cooperation) to react to changes in my content model and then trigger the update. For the SQL layer, you could use the MyBatis framework already included in Alfresco and create your own DAOs to talk to your 3rd party database.

Please keep in mind that while access to a 3rd party database is quite simple, transaction handling across both databases (Alfresco and 3rd party) is totally different story and fully up to you, e.g. you would have to put in place the necessary mechanisms to handle rollbacks and commits correctly yourself, if you want to have transactional consistency / atomicity across both systems.

Regards
Axel