The publish_web_content_processdefinition now always runs the PublishEventAction asynchronously. Added ScriptAction.executeAsynchronously(ScriptNode) method.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28975 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2011-07-13 11:45:51 +00:00
parent 17a5ae11ff
commit 9534fcf21e
6 changed files with 84 additions and 186 deletions

View File

@@ -141,12 +141,36 @@ public class ScriptAction implements Serializable, Scopeable
// Reset the actioned upon node
node.reset();
}
/**
* Execute action. The existing transaction will be joined.
*
* @param node
* the node to execute action upon
*/
@SuppressWarnings("synthetic-access")
public void executeAsynchronously(ScriptNode node)
{
performParamConversionForRepo();
executeAsynchronouslyImpl(node);
// Parameters may have been updated by action execution, so reset cache
this.parameters = null;
// Reset the actioned upon node
node.reset();
}
protected void executeImpl(ScriptNode node)
{
actionService.executeAction(action, node.getNodeRef());
}
protected void executeAsynchronouslyImpl(ScriptNode node)
{
actionService.executeAction(action, node.getNodeRef(), true, true);
}
/**
* Execute action, optionally starting a new, potentially read-only transaction.
*