Alfresco Workdesk BPM plugin issue with workflow package items

Alfresco's Workdesk has a BPM plugin to integrate with Filenet P8's BPM product as well as with the Alfresco's Activiti or JBPM. It is very easy to install and configure, there are some examples shipped with Workdesk for reference.

I was surprised how smoothly this worked, plugins to launch workflows from result views, execute steps, inbox letting the user know tasks assigned to him, etc. When I switched back to Alfresco Share and started a workflow from there I couldn't see any attachments in Workdesk, but on Share everything looked OK. I was wondering what went wrong there so I added another file to the existing workflow instance, but this time from Workdesk.

Comparing the files in the Node Browser I spotted a difference. BOOM!! When creating a workflow from Alfresco Share it uses the bpm:packageContains association for the package items in the workflow instance. Workdesk has been built using CMIS and I belive that the only parent-child association supported is the cm:contains. I did a test by starting a workflow using the following script:

var wfdef = workflow.getDefinitionByName("activiti$activitiReview");
if (wfdef)
{
	var wfparams = new Array();
	wfparams["bpm:workflowDescription"] = "Testing for Workdesk";
	wfparams["bpm:assignee"] = people.getPerson("admin");
	var wfpackage = workflow.createPackage();
	wfpackage.addNode(document);
	var wfpath = wfdef.startWorkflow(wfpackage, wfparams);
}

Effectively, the step processor in Workdesk showed all the items in the package. Note that if you use the "start-workflow" action executer, this uses the bpm:packageContains association and the files won't be visible in the case management tool.

I recommend disabling the launch of workflows from Alfresco UI when integration with Workdesk BPM plugin. The workflows could then be started from Workdesk, automatically, or ammending the existing Alfresco code...

Add new comment