mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
The ActionServiceImpl was attempting to call a service method after an exception.
- This didn't fail before because the actions didn't use the authenticated services but does now. - When an action fails, the service attempts to make it asynchronous, but requires some info in order to proceed. That info is now fetched upfront. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2385 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -365,6 +365,9 @@ public class ActionServiceImpl implements ActionService, RuntimeActionService, A
|
|||||||
logger.debug("Current action = " + action.getId());
|
logger.debug("Current action = " + action.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get the current user early in case the process fails and we are unable to do it later
|
||||||
|
String currentUserName = this.authenticationComponent.getCurrentUserName();
|
||||||
|
|
||||||
if (actionChain == null || actionChain.contains(action.getId()) == false)
|
if (actionChain == null || actionChain.contains(action.getId()) == false)
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled() == true)
|
if (logger.isDebugEnabled() == true)
|
||||||
@@ -432,7 +435,7 @@ public class ActionServiceImpl implements ActionService, RuntimeActionService, A
|
|||||||
if (compensatingAction != null)
|
if (compensatingAction != null)
|
||||||
{
|
{
|
||||||
// Set the current user
|
// Set the current user
|
||||||
((ActionImpl)compensatingAction).setRunAsUser(this.authenticationComponent.getCurrentUserName());
|
((ActionImpl)compensatingAction).setRunAsUser(currentUserName);
|
||||||
|
|
||||||
// Queue the compensating action ready for execution
|
// Queue the compensating action ready for execution
|
||||||
this.asynchronousActionExecutionQueue.executeAction(this, compensatingAction, actionedUponNodeRef, false, null);
|
this.asynchronousActionExecutionQueue.executeAction(this, compensatingAction, actionedUponNodeRef, false, null);
|
||||||
|
Reference in New Issue
Block a user