I suggest to work on a transactional environment on WebScripts, that is by default if you set the value of the property "transaction" (in the descriptor file) to "required" or "requiresnew".
If you would like to work in a similar way of Java threads you could set "requiresnew" and the Spring context will create a new transaction for each WebScript call.
Remember that if you set the value of the property "transaction" to "none" this means that you are working without any transactional support, this means that you could corrupt the repository with some critical operations. But it could be useful this setting if you need to explicitly manage the transactions using the TransactionService of Alfresco deciding when the container must execute a rollback of all the operations. This is possible only using the Java API of Alfresco (Foundation Services API).
By default WebScripts are transactional (if the transaction property has a "requiresnew" or "required" value) for ALL the operations that are executed inside of it, this means that if only one of the operation fails, all the changes will be rollbacked.
Hope this helps :wink: