Expand my Community achievements bar.

SOLVED

Multiple selection of users from workflow inbox

Avatar

Level 2

Hi,

Currently we can't select more than one user from the drop-down which comes on click of complete from workflow inbox.That is we can't assign more than one user which are part of different groups or only few users from same group. Could you please tell how can we achieve this

I tried to give the property multiSelect:true in the /libs/cq/workflow/extensions/inbox/tbar/complete.js in the panel variable but it didn't work. After that I created a new ComboBox variable with the multiselect:true and added to the existing panel variable but still it didn't work.

The multiSelect:true property works fine for Ext.form.ComboBox but fails for CQ.Ext.form.ComboBox. I searched this property in widget api but could not find it.

Could you please tell me if I can achieve this by any other way or this is not at all possible

var combo1 = new CQ.Ext.form.ComboBox({ typeAhead: false, triggerAction: 'all', lazyRender:true, mode: 'local', multiSelect:true, forceSelection:true, store: new CQ.Ext.data.ArrayStore({ id: 0, fields: [ 'myId', 'displayText' ], data: [[1, 'item1'], [2, 'item2'],[3,'item3'],[4,'item4']] }), valueField: 'myId', displayField: 'displayText' }); var panel = { xtype:"dialogfieldset", title: CQ.shared.Util.ellipsis(item.get("title"), 60, true) + " (" + title + ")", collapsed:false, collapsible:false, items:[{ xtype:"combo", id:"cq.workflow.inbox.complete.combo-" + item.id, anchor:CQ.themes.Dialog.ANCHOR, store:new CQ.Ext.data.Store({ proxy: new CQ.Ext.data.HttpProxy({ url:item.id + ".routes.json", method:"GET" }), reader: new CQ.Ext.data.JsonReader({ totalProperty:"results", root:"routes" }, [ {name: "rid"}, {name: "label"}, {name: CQ.shared.XSS.getXSSPropertyName("label")} ]) }), name:"route-" + item.id, fieldLabel:CQ.I18n.getMessage("Next Step"), displayField:"label", valueField:"rid", hiddenName:"route-" + item.id, title:CQ.I18n.getMessage("Available Destinations"), selectOnFocus:true, triggerAction: "all", allowBlank:false, editable:false, mode:"local", tpl: new CQ.Ext.XTemplate( '<tpl for=".">', '<div class="x-combo-list-item">', '{[CQ.shared.XSS.getXSSTablePropertyValue(values, \"label\", 90)]}', '</div>', '</tpl>' ) },{ xtype:"hidden", name:"item", value:item.id },combo1] }; panel.items.push(wfDlg);

I created a variable combo1 and added it to the panel at line number 174 in the complete.js

Thanks for the help !!!

1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi  Mahesh,

I am afraid even if you achieve multi-select capability, it might not work as desired.

In each workflow step, there are workItem nodes for each step which have a property 'assignee' which is a single-value property and not multi-value one. Whenever a user or group is assigned as a participant for a workflow step, this property stores the user/group id. Even if you introduce multi-select capability from front-end, it would not be stored correctly in this property.

This property is used and stored at multiple places during workflow processing.

So the requirement seems to be difficult to be achieved by just front-end customizations, it would need much complex customizations in workflow processing.

Regards

Vatsal

.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 3

Hi  Mahesh,

I am afraid even if you achieve multi-select capability, it might not work as desired.

In each workflow step, there are workItem nodes for each step which have a property 'assignee' which is a single-value property and not multi-value one. Whenever a user or group is assigned as a participant for a workflow step, this property stores the user/group id. Even if you introduce multi-select capability from front-end, it would not be stored correctly in this property.

This property is used and stored at multiple places during workflow processing.

So the requirement seems to be difficult to be achieved by just front-end customizations, it would need much complex customizations in workflow processing.

Regards

Vatsal

.