mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
59881: Merged V4.2-BUG-FIX (4.2.2) to HEAD-BUG-FIX (Cloud/4.3) 59606: Merged DEV to V4.2-BUG-FIX 58106: Fixed formatting in MailActionExecuter found during investigations 58107: Fixed formatting issues in ActionExecuterAbstractBase found during investigations 58108: Further detection of transaction state in the base action code (MNT-9806) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62197 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -24,6 +24,8 @@ import java.util.Set;
|
||||
import org.alfresco.repo.action.ActionDefinitionImpl;
|
||||
import org.alfresco.repo.action.ParameterizedItemAbstractBase;
|
||||
import org.alfresco.repo.lock.LockUtils;
|
||||
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
|
||||
import org.alfresco.repo.transaction.AlfrescoTransactionSupport.TxnReadState;
|
||||
import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.action.ActionDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
@@ -236,6 +238,11 @@ public abstract class ActionExecuterAbstractBase extends ParameterizedItemAbstra
|
||||
*/
|
||||
public void execute(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
if (AlfrescoTransactionSupport.getTransactionReadState() == TxnReadState.TXN_NONE)
|
||||
{
|
||||
throw new IllegalStateException("Actions invariably access the repository. Doing so without a transaction is not recommended.");
|
||||
}
|
||||
|
||||
// Check the mandatory properties
|
||||
checkMandatoryProperties(action, getActionDefinition());
|
||||
|
||||
|
Reference in New Issue
Block a user