Home > Forum > Forms > Split item list for subprocess and return data to main process

Split item list for subprocess and return data to main process
0

Hello!
I have another case to solve.
There is list of employees which is maganed by one employee A.
That employee A wants to share that list to few directors (B, C) to ask them for fill in some columus.
My question is that is there some action to split item list for subprocesses and then, after directors (B, C) fill data, return it to main process (to employee A)?
The condition that need to be met is that director B can't see data of director C (only employee A who manage the list can see all data).
I've read that articles but still don't know how could I split item list (https://community.webcon.com/posts/post/starting-workflows-in-webcon-bps-actions/76).
I hope that you understand my problem that I try to describe.
Thank you in advance for any sugestions.

MVP

Hi Stanislaw,

I think I understand what you want to achieve. You can try using the functionality from this process: https://community.webcon.com/online-store/app/requests/26 to start sub processes based on the values from the item list.

Next, on the sub processes you need to add permission (Actions > Privileges > Add Privileges) to the director B or director C. This way each director will see only his/her information.

Hope that helps. If not, let me know.

Martin

MVP

Hi Stanisław,

the suggestion of Martin could be a start, a complete picture could look like this:

1. Use "Start subworkflow (sql) action and use a query like this
select distinct director as RESPONSIBLE_Database_Column from WFelementDetails where DET_WFDID = INSTANCEID and DET_WFCONID = ITEMLISTID
Responsible would be your field in the sub process.
2. The sub workflow will have an action to populate it's own item list. This will copy all item list rows where the responsible of the sub workflow is referenced.
select DET_ID as OriginalItemListRow, Column1,Column2 from WFElementDetails where DET_WFDID = PARENT_Workflow_InstanceId and DET_WFCONID = ITEMLISTID and ItemListResponsibleColumn = ResponsibleField
It's important to copy the item list row id (DET_ID) in a (technical) column for step 4.
3. The parent process will move to a wait for sub workflow step
4. Upon completion of all sub workflows, an action be executed to get the updated values from the sub workflow item lists.
select OrignialItemListRowItemListColumn, Column1 from WFElementDetails where DET_WFDID in (select WFD_ID from WFelements where WFD_WFDID = WFD_ID and WFD_DTYPEID = SubWorkflowFormType) and DET_WFCONID = SubworkflowItemListFieldId

The OrignialItemListRowItemListColumn will be used to update the correct item list rows.
I hope I could make myself clear and just in case: The sql commands haven't been tested. :)

Best regards,
Daniel