Wire in the asynchronous action service OnAsyncActionExecute policy (policy was previously defined but not active)

Update the tagging service tests, and some of the action tracking service tests to wait on the policy firing instead of using Thread.sleep


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23188 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2010-10-18 05:24:03 +00:00
parent 7442465407
commit 8bfc88b8d6
3 changed files with 292 additions and 125 deletions

View File

@@ -139,10 +139,9 @@ public class AsynchronousActionExecutionQueueImpl implements AsynchronousActionE
private void invokeOnAsyncActionExecutePolicy(Action action, NodeRef actionedUponNodeRef)
{
// get qnames to invoke against
Set<QName> qnames = getTypeAndAspectQNames(actionedUponNodeRef);
// execute policy for node type and aspects
AsynchronousActionExecutionQueuePolicies.OnAsyncActionExecute policy = onAsyncActionExecuteDelegate.get(actionedUponNodeRef, qnames);
// Execute the policy, passing it all details, firing as a general action case
AsynchronousActionExecutionQueuePolicies.OnAsyncActionExecute policy =
onAsyncActionExecuteDelegate.get(actionedUponNodeRef, ActionModel.TYPE_ACTION);
policy.onAsyncActionExecute(action, actionedUponNodeRef);
}
@@ -428,11 +427,19 @@ public class AsynchronousActionExecutionQueueImpl implements AsynchronousActionE
{
public Object execute()
{
// If we have rules, apply them
if (ActionExecutionWrapper.this.executedRules != null)
{
AlfrescoTransactionSupport.bindResource("RuleServiceImpl.ExecutedRules", ActionExecutionWrapper.this.executedRules);
}
// Allow other classes to know when this action completes
AlfrescoTransactionSupport.bindListener(new CallbackTransactionListener(
ActionExecutionWrapper.this.action,
ActionExecutionWrapper.this.actionedUponNodeRef
));
// Have the action run
ActionExecutionWrapper.this.actionService.executeActionImpl(
ActionExecutionWrapper.this.action,
ActionExecutionWrapper.this.actionedUponNodeRef,