mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged V4.0-BUGFIX into HEAD
36343: ALF-13898: starting workflow from IMAP now using workflowDefs with engine name included, fallback to appending $jbpm when not present, to preserve backwards compatibility. 36342: ALF-14120: fix only completed tasks returned git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@36344 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
<webscript>
|
||||
<shortname>IMAP Workflow Handler</shortname>
|
||||
<description>
|
||||
This webscript starts a different workflow. It is used in the IMAP email body links.
|
||||
This webscript starts a different workflow. It is used in the IMAP email body links. The workflowType should be a fully-qualified worklfow-definition name, with
|
||||
engine-name included. eg: activiti$activitiAdhoc. If engine-name is left out, JBPM is used as engine-name for the process.
|
||||
(The optional feature is the reply email with a report.)
|
||||
</description>
|
||||
<url>/imap/start-workflow?alfTicket={ticket}&nodeRefId={id}&workflowType={wt}&assignTo={at}&workflowDueDateDay={ddd}&workflowDueDateMonth={ddm}&workflowDueDateYear={ddy}&description={desc}</url>
|
||||
<url>/imap/start-workflow?alfTicket={ticket}&nodeRefId={id}&workflowType={wt}&assignTo={at}&workflowDueDateDay={ddd}&workflowDueDateMonth={ddm}&workflowDueDateYear={ddy}&description={desc}&workflowPriority={wp?}</url>
|
||||
<format default="html">extension</format>
|
||||
<authentication>user</authentication>
|
||||
<transaction>required</transaction>
|
||||
|
@@ -9,7 +9,13 @@ function main()
|
||||
status.redirect = true;
|
||||
return;
|
||||
}
|
||||
var workflowType = "jbpm$wf:" + args.workflowType;
|
||||
|
||||
// ALF-13898: accept FULL workflow-definition name if provided, otherwise revert to prefixing behavior
|
||||
var workflowType = args.workflowType;
|
||||
if(workflowType.indexOf('$') < 0) {
|
||||
workflowType = "jbpm$wf:" + workflowType;
|
||||
}
|
||||
|
||||
var assignTo = people.getPerson(args.assignTo);
|
||||
if (assignTo == undefined)
|
||||
{
|
||||
@@ -32,7 +38,12 @@ function main()
|
||||
workflow.parameters.workflowName = workflowType;
|
||||
workflow.parameters["bpm:workflowDescription"] = description;
|
||||
workflow.parameters["bpm:assignee"] = assignTo;
|
||||
workflow.parameters["bpm:workflowPriority"] = args.workflowPriority;
|
||||
|
||||
if (args.workflowPriority != null)
|
||||
{
|
||||
workflow.parameters["bpm:workflowPriority"] = args.workflowPriority;
|
||||
}
|
||||
|
||||
if (dueDate != null)
|
||||
{
|
||||
workflow.parameters["bpm:workflowDueDate"] = dueDate;
|
||||
|
Reference in New Issue
Block a user