Search in sources :

Example 6 with Workspace

use of com.adobe.acs.commons.workflow.bulk.execution.model.Workspace in project acs-aem-commons by Adobe-Consulting-Services.

the class FastActionManagerRunnerImpl method initialize.

@Override
public void initialize(QueryHelper queryHelper, Config config) throws PersistenceException, RepositoryException {
    Workspace workspace = config.getWorkspace();
    initialize(workspace, 0);
    workspace.commit();
}
Also used : Workspace(com.adobe.acs.commons.workflow.bulk.execution.model.Workspace)

Example 7 with Workspace

use of com.adobe.acs.commons.workflow.bulk.execution.model.Workspace in project acs-aem-commons by Adobe-Consulting-Services.

the class FastActionManagerRunnerImpl method complete.

public void complete(ResourceResolver resourceResolver, String workspacePath, ActionManager manager, int success) throws PersistenceException, RepositoryException {
    Workspace workspace = resourceResolver.getResource(workspacePath).adaptTo(Workspace.class);
    workspace.setCompleteCount(success);
    for (com.adobe.acs.commons.fam.Failure f : manager.getFailureList()) {
        workspace.addFailure(f.getNodePath(), null, f.getTime());
        workspace.incrementFailCount();
    }
    super.complete(workspace);
    manager.closeAllResolvers();
    if (actionManagerFactoryRef != null) {
        actionManagerFactoryRef.purgeCompletedTasks();
    } else {
        log.warn("Action Manager Factory reference is null. Please purge completed tasks via the JMX console.");
    }
}
Also used : Workspace(com.adobe.acs.commons.workflow.bulk.execution.model.Workspace)

Aggregations

Workspace (com.adobe.acs.commons.workflow.bulk.execution.model.Workspace)7 ActionManager (com.adobe.acs.commons.fam.ActionManager)1 AEMWorkflowRunnerImpl (com.adobe.acs.commons.workflow.bulk.execution.impl.runners.AEMWorkflowRunnerImpl)1 Config (com.adobe.acs.commons.workflow.bulk.execution.model.Config)1 Failure (com.adobe.acs.commons.workflow.bulk.execution.model.Failure)1 Payload (com.adobe.acs.commons.workflow.bulk.execution.model.Payload)1 SimpleDateFormat (java.text.SimpleDateFormat)1 JSONException (org.apache.sling.commons.json.JSONException)1 JSONObject (org.apache.sling.commons.json.JSONObject)1 ScheduleOptions (org.apache.sling.commons.scheduler.ScheduleOptions)1