投稿済み Fri, 12 Oct 2018 18:53:49 GMT 、投稿者 Jay Anders Solutions Integrator Implementation

Is there a way to have workflow manager reference the user groups/roles in the Admin tool and populate a variable on the fly?

I have an approval process that has 6 plants, L1 approvers are in a group that coincides with the plant number. I would like to be able to automatically assign the next task to plant 1 L2  if the L1 approver  is a member of plant 1 L1 approvers, plant 2 L2 if L1 approver is plant 2 L1 approver etc. . The catch is customer does not want to have to manage Workflow task every time the user group membership changes. So ideally we would be able to look into group or role of user administration and verify from there.

投稿済み Fri, 12 Oct 2018 19:20:47 GMT 、投稿者 Jon Weston File IT Solutions Sr Application Developer and RIM specialist

Hi Jay, you totally can do this.  How comfortable are you in SQL? Here's the SQL for a custom view I setup in DW6.12 (but I'm sure it'll work in earlier version) that returns a list of the users with their groups and roles:

SELECT dbo.DWUser.name, dbo.DWGroup.name AS GroupName, dbo.DWGroup.guid, dbo.DWRoles.name AS RoleName FROM dbo.DWGroup INNER JOIN dbo.DWUserToGroup ON dbo.DWGroup.gid = dbo.DWUserToGroup.gid INNER JOIN dbo.DWUser ON dbo.DWUserToGroup.uid = dbo.DWUser.uid INNER JOIN dbo.DWUserToRole ON dbo.DWUser.uid = dbo.DWUserToRole.uid INNER JOIN dbo.DWRoles ON dbo.DWUserToRole.rid = dbo.DWRoles.rid WHERE (dbo.DWGroup.name <> N'Public')

It also returns the GUID of the group but you probably don't need that.  Once you have that in place you can reference it in a workflow Assign Data task as an external data source and assign the results (using whatever criteria you need) to a variable that's been declared as a "List of Users" type and then assign the task to that.

Hopefully that's enough to get you started - lemme know how it goes.

投稿済み Tue, 16 Oct 2018 14:46:50 GMT 、投稿者 Jay Anders Solutions Integrator Implementation

I'm fairly new to SQL. This runs but I am needing a different result. This one pulls up all of the roles a user is in. I need to link a user from plant1 L1 group (or role if we use roles instead of groups) to a the user  in Plant1 L2. If a user has other groups or roles this pulls them all up.

投稿済み Fri, 19 Oct 2018 13:32:53 GMT 、投稿者 Matthew Trembly Software Support Manager

Can you establish a variable for the plant number and ask DocuWare to evaluate the path based upon the plant number?

投稿済み Wed, 24 Oct 2018 03:42:00 GMT 、投稿者 Jay Anders Solutions Integrator Implementation

Below will pull up the users and their  groups. We decided to stay in group level. Query works in mssql.

SELECT        dbo.DWUser.name, dbo.DWGroup.name AS GroupName, dbo.DWGroup.guid, dbo.DWRoles.name AS RoleName

FROM            dbo.DWGroup INNER JOIN

                         dbo.DWUserToGroup ON dbo.DWGroup.gid = dbo.DWUserToGroup.gid INNER JOIN

                         dbo.DWUser ON dbo.DWUserToGroup.uid = dbo.DWUser.uid INNER JOIN

                         dbo.DWUserToRole ON dbo.DWUser.uid = dbo.DWUserToRole.uid INNER JOIN

                         dbo.DWRoles ON dbo.DWUserToRole.rid = dbo.DWRoles.rid

WHERE        (dbo.DWGroup.name <> N'Public') AND (dbo.DWRoles.name LIKE 'Plant%')

 

However workflow does not assign data - external data from my view:

GroupName like 'Plant%' and "G_KW_user = Name (sql command SELECT GroupName FROM Plant_Groups Where GroupName like 'Plant%'  and"G_KW_User = name)

The command works in SQL (take out the GV as SQL doesn't know it) but workflow doesn't like it

https://www.docuware.com/sites/default/files/forums-images/Capture1_0.PNG

https://www.docuware.com/sites/default/files/forums-images/Capture2_0.PNG

https://www.docuware.com/sites/default/files/forums-images/Capture3.PNG

フォーラムに投稿するためにはログインが必要です。