updating a file using Alfresco JavaScript API

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2009 08:03 AM
Using the Alfresco JavaScript API, I noticed that when you run a script that changes a file, the file is not updated until the script does not finish its execution.
At least to me seems to behave in this way. :x
I wanted to know if it is actually so, and if you can force the update of the file during script execution?
Thanks in advance for the help.
Regards,
ngiolet
At least to me seems to behave in this way. :x
I wanted to know if it is actually so, and if you can force the update of the file during script execution?
Thanks in advance for the help.
Regards,
ngiolet
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2009 08:10 AM
If you've updated properties only, then use node.save().
I suspect the issue you have is that webscripts execute in one transaction - currently this is not configurable. You could change the webscript descriptor to not use transactions, but this isn't recommended.
Mike
I suspect the issue you have is that webscripts execute in one transaction - currently this is not configurable. You could change the webscript descriptor to not use transactions, but this isn't recommended.
Mike

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2009 03:52 AM
These are your options, when talking about transactions:
MikeH, do you know of any documentation talking about transactions? I'm having troubles finding any.
transaction (optional) is the required level transaction; valid values are: * none specifies that no transaction is required at all * required specifies that a transaction is required (and will inherit an existing transaction, if open) * requiresnew specifies that a new transaction is required
MikeH, do you know of any documentation talking about transactions? I'm having troubles finding any.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2009 04:25 AM
MikeH, do you know of any documentation talking about transactions? I'm having troubles finding any.Not specifically, but these are the top wiki hits which talk about them:
http://wiki.alfresco.com/wiki/Java_Foundation_API
http://wiki.alfresco.com/wiki/Introducing_the_Alfresco_Java_Content_Repository_API#Transaction_Manag...
http://wiki.alfresco.com/wiki/Alfresco_Repository_Architecture
Thanks,
Mike
