diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/imap/start-workflow.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/repository/imap/start-workflow.get.desc.xml index 0e9eb6e420..efe1d0deb9 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/imap/start-workflow.get.desc.xml +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/imap/start-workflow.get.desc.xml @@ -1,10 +1,11 @@ IMAP Workflow Handler - 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.) - /imap/start-workflow?alfTicket={ticket}&nodeRefId={id}&workflowType={wt}&assignTo={at}&workflowDueDateDay={ddd}&workflowDueDateMonth={ddm}&workflowDueDateYear={ddy}&description={desc} + /imap/start-workflow?alfTicket={ticket}&nodeRefId={id}&workflowType={wt}&assignTo={at}&workflowDueDateDay={ddd}&workflowDueDateMonth={ddm}&workflowDueDateYear={ddy}&description={desc}&workflowPriority={wp?} extension user required diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/imap/start-workflow.get.js b/config/alfresco/templates/webscripts/org/alfresco/repository/imap/start-workflow.get.js index c55922ffaf..57f9defe60 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/imap/start-workflow.get.js +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/imap/start-workflow.get.js @@ -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;