Skip to main content

I have a workflow that reads a list of comma separated usernames, and kicks off an IPC event for each user with that user as the destination... well at least that's the idea. I had this working in K2 2003 but am having real problems in Blackpearl.


I've seen the post from Cherish http://k2underground.com/forums/post/18429.aspx but that hasn't made any difference. They seem to be assigned to either K2Server or BPService.


 I think I have the Activity slots set up correctly, "create a new slot for each destination" and "Plan just once" under the destination rule. The code inside the destination rule is:


            stringÂ] sDestUsers;
            sDestUsers = K2.ProcessInstance.DataFieldso"DestUsers"].Value.ToString().Split(new Charo] { ',' });
            foreach (string sUser in sDestUsers)
            {
                K2.Destinations.Add(DestinationType.User, "K2:K2Demo"" + sUser);
            }


Seems like inside the Workspace, the IPC events show the correct Destination, but the child processes don't...


Any ideas?

As a test, use the Plan Per Destination - All At Once. Specify a single slot and just to be sure choose the Resolve all roles to users option.


HTH,


Mike


Hi Mike


Nothing changed. The IPC server event shows the correct destinations, the child processes show K2:K2DemoBService as the Originator and the destination is K2Server


How is the activity planned in the process called by the IPC event?


Not sure what you mean, sorry.


The child process has some client and server events, but the originator of the child process is always K2:K2Demo/BPUser and the destination seems to be K2Server. The correct number of child processes are being spawned.


The child process (at least the client event in the child process) must be setup so that the task is not assigned to K2Server. This is where you can specify PPD-All at Once as the activity plan in the advanced destination rule wizard and get it assigned to the correct user.


When you call the IPC event you can specify some field mapping as in the attached screenshot. I'm not sure how you would do this in code, however you may not have to as long as you change the data field in the parent process for each child process you spawn.


HTH,


Mike


 


15682iBB9E86C9AF0FB6A4.jpg

The destination for the client event in the child process has been to the process originator. As I showed in the sample above, I was trying to set the process originator in the destination rule for the IPC activity.


I have done the field mappings through the IPC wizard and then clicked on "View Code" to add extra bits in.


I'm not sure which of the "plan per" options I should be using inside the IPC activity destination wizard either.


Reply