Can I change the members of a Destination Queue at Runtime?

  • 22 January 2008
  • 9 replies
  • 1 view

Badge +1

Is it possible to change the members of a destination queue after a process has been deployed? My question stems from the need to have different users in the destination queues for the different envitonments that my solution runs in. (ie. DEV, TEST, PROD)


 If I have to edit the destination queues manually before exporting to the various environments it will make it difficult to justify using destination queues.


9 replies

Badge +1

It looks like I found my answer in another post.


 http://k2underground.com/forums/thread/8783.aspx

Badge +10

Yes, they will


"you can create reusable lists of workflow participants who are responsible for the completion of workflow task items. Destination queues can only be created at design-time. One advantage of destination queues is that when a new user is added to Active Directory the K2.net™ 2003 Server will pick up the user automatically, provided that the user belongs to a group or organizational unit used in the Destination Queue. You can set the refresh rate of a destination queue in the K2.net™ 2003 Service Manager. The K2.net™ 2003 Server will retrieve the list of users in the queue according to the refresh interval time set for that queue.


To change the refresh interval for a queue, do the following: 
   •  Open the K2.net™ 2003 Service Manager.
   •  Click on "Queues" in the tree view.
   •  Right-click on the "Queue" and select "Change Interval".
 
For your added reading pleasure check out


http://kb.k2workflow.com/articles/kb000161.aspx


and


http://kb.k2workflow.com/articles/kb000020.aspx

Badge +1
I would be interested in looking up a list of AD groups to route to dynamically from a database call for example. There are quite a few members of these groups and it looks like I will have to go out and get the members of the groups in order to route to them individually. Can I route to an AD group without using a destination queue?
Badge +10
Yes you can do that
Badge +1

If I specify an AD group ("CorpApproversADGroup") in the following code will it route to all members of that group?



K2.Destinations.Add(DestinationType.User, "CorpApproversADGroup");

Badge +13

I didn't think you could route to an AD "group" without using the destination queue.   You could route to the individual members of AD group by querying the membership but that works completely differently.

 
The only way I could think of with switching from TestADGroup to ProdADGroup without code change is to set a StringTable value for IsTest or not, and in the destination code you specify the queue to use (TestADGroup or ProdADGroup).   That means you have to set up both queues for the process.
 

Badge +1

Yep, that pretty much settles it. I am going to be dealling with 18 destination queues x3. (for Dev/Test/Prod) ouch.


I am also realizing this is necessary because when I was getting the AD group members and routing to them individually i noticed that if a new user is added to the group that they won't get the worklist items previously routed to the queue.


Thank to everyone for the help.


 P.S. I am hoping i can completely disable the polling of AD for these unused destination queues in the other environments.

Badge +13

You probably want to use SQL batch update to set the requery time to a huge number in other environments, (otherwise you have to change the interval 36 times 3).   For non-prod env. I figured out a way to delete the unused dest queues from the entry forever.   Currently there is no tool to remove the destination queue once it's created.

 
 

Badge +4

Another approach is to store all the destination users information in a SharePoint list.


We can dynamically pull the data and add user logins (domainuser) to the Destination Collection.


Advantage with this approach is easy maintenance. No need to export process when changes are required.


HTH,


Siva

Reply