mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2 to HEAD
7534: Merged V2.1 to HEAD 7398: XPath metadata extractor selector handles malformed and empty XML files 7401: Fix AR-1879: JBPM Timer never fires 7413: Contribution: Integrity checker ignores exceptions that would normally trigger transaction retries. 7416: AR-1884.Unicode wildcard processing. 7417: Added filtering of pseudo files when a partial wildcard search path is used, such as '*.csv'. AR-1889. 7436: AR-1863: major version's can now be created via the web service API; 7451: Fix for handling of UTF-8 application/x-www-form-urlencoded encoded form arguments as raised in support ticket 242 7458: Fix for AR-1900 7520: Fix to Template API where content was not retrievable from custom d:content properties on a node git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8413 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -457,6 +457,8 @@ public class WorkflowInterpreter extends BaseInterpreter
|
||||
}
|
||||
}
|
||||
|
||||
List<WorkflowTimer> timers = new ArrayList<WorkflowTimer>();
|
||||
|
||||
if (id.equals("all"))
|
||||
{
|
||||
for (WorkflowDefinition def : workflowService.getAllDefinitions())
|
||||
@@ -464,11 +466,7 @@ public class WorkflowInterpreter extends BaseInterpreter
|
||||
List<WorkflowInstance> workflows = workflowService.getActiveWorkflows(def.id);
|
||||
for (WorkflowInstance workflow : workflows)
|
||||
{
|
||||
List<WorkflowTimer> timers = workflowService.getTimers(workflow.id);
|
||||
for (WorkflowTimer timer : timers)
|
||||
{
|
||||
out.println("id: " + timer.id + " , name: " + timer.name + " , due date: " + timer.dueDate + " , path: " + timer.path.id + " , node: " + timer.path.node.name + " , process: " + timer.path.instance.id + " , task: " + timer.task.name + "(" + timer.task.id + ")");
|
||||
}
|
||||
timers.addAll(workflowService.getTimers(workflow.id));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -477,11 +475,22 @@ public class WorkflowInterpreter extends BaseInterpreter
|
||||
List<WorkflowInstance> workflows = workflowService.getActiveWorkflows(id);
|
||||
for (WorkflowInstance workflow : workflows)
|
||||
{
|
||||
List<WorkflowTimer> timers = workflowService.getTimers(workflow.id);
|
||||
for (WorkflowTimer timer : timers)
|
||||
{
|
||||
out.println("id: " + timer.id + " , name: " + timer.name + " , due date: " + timer.dueDate + " , path: " + timer.path.id + " , node: " + timer.path.node.name + " , process: " + timer.path.instance.id + " , task: " + timer.task.name + "(" + timer.task.id + ")");
|
||||
}
|
||||
timers.addAll(workflowService.getTimers(workflow.id));
|
||||
}
|
||||
}
|
||||
|
||||
for (WorkflowTimer timer : timers)
|
||||
{
|
||||
out.print("id: " + timer.id + " , name: " + timer.name + " , due date: " + timer.dueDate + " , path: " + timer.path.id + " , node: " + timer.path.node.name + " , process: " + timer.path.instance.id);
|
||||
if (timer.task != null)
|
||||
{
|
||||
out.print(" , task: " + timer.task.name + "(" + timer.task.id + ")");
|
||||
}
|
||||
out.println();
|
||||
if (timer.error != null)
|
||||
{
|
||||
out.println("error executing timer id " + timer.id);
|
||||
out.println(timer.error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -84,21 +84,14 @@ public class AlfrescoTimer extends Timer
|
||||
}
|
||||
|
||||
// execute timer
|
||||
if (username == null)
|
||||
executeResult = AuthenticationUtil.runAs(new RunAsWork<Boolean>()
|
||||
{
|
||||
executeResult = super.execute(jbpmContext);
|
||||
}
|
||||
else
|
||||
{
|
||||
executeResult = AuthenticationUtil.runAs(new RunAsWork<Boolean>()
|
||||
@SuppressWarnings("synthetic-access")
|
||||
public Boolean doWork() throws Exception
|
||||
{
|
||||
@SuppressWarnings("synthetic-access")
|
||||
public Boolean doWork() throws Exception
|
||||
{
|
||||
return AlfrescoTimer.super.execute(jbpmContext);
|
||||
}
|
||||
}, username);
|
||||
}
|
||||
return AlfrescoTimer.super.execute(jbpmContext);
|
||||
}
|
||||
}, (username == null) ? "system" : username);
|
||||
|
||||
return executeResult;
|
||||
}
|
||||
|
@@ -2868,9 +2868,14 @@ public class JBPMEngine extends BPMEngine
|
||||
WorkflowTimer workflowTimer = new WorkflowTimer();
|
||||
workflowTimer.id = createGlobalId(new Long(timer.getId()).toString());
|
||||
workflowTimer.name = timer.getName();
|
||||
workflowTimer.error = timer.getException();
|
||||
workflowTimer.dueDate = timer.getDueDate();
|
||||
workflowTimer.path = createWorkflowPath(timer.getToken());
|
||||
workflowTimer.task = createWorkflowTask(timer.getTaskInstance());
|
||||
TaskInstance taskInstance = timer.getTaskInstance();
|
||||
if (taskInstance != null)
|
||||
{
|
||||
workflowTimer.task = createWorkflowTask(taskInstance);
|
||||
}
|
||||
return workflowTimer;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user