One of the most frequently used events I used in k2 2003 was the data manipulation event. Where has this gone in Blackpearl? Same with the SQL and Web Service event templates?
Thanks,
Jason
One of the most frequently used events I used in k2 2003 was the data manipulation event. Where has this gone in Blackpearl? Same with the SQL and Web Service event templates?
Thanks,
Jason
Unfortunately there are no udpated blackpearl wizards to these K2.net 2003 templates. However these K2 2003 event templates will be able to be used within a blackpearl process in an upcoming blackpearl release.
In one case I am just trying to copy and activity level data field to a process data field to be used in a later line rule. In another case, I just want to set a data field's value to False (default is true) if the workflow goes down a certain path. Was easy to do with the data manipulation template in 2003.
Thanks,
Jason
Until the K2.net 2003 Data Manipulation event wizard is supported in blackpearl, you'll need to use code within a Server Event.
To copy an Acitivty Data Field to a Process Data field:
K2.ProcessInstance.DataFields["SomeField"].Value = K2.ActivityInstanceDestination.DataFields["SomeField"].Value ;
To set a process datafield to true:
K2.ProcessInstance.DataFields["SomeField"].Value = true;
HTH.
This is a big help, but I can't seem to get a handle to the user name of the destination user. The line of code below generates an "Object reference not set to an instance of an object" error:
K2.ProcessInstance.DataFields[
"ComplianceApprover"].Value = K2.ActivityInstanceDestination.User.Name;I know the left side is correct because if I do this, everything is fine:
K2.ProcessInstance.DataFields["ComplianceApprover"].Value = "Me";
Blackpearl introduces some new concepts around Activity destinations. If you open up the destination rule then click "Back" you should see an option to run in Advanced mode. Check this and then click next. At this point you should be presented a set of options. By default "Plan just once" is selected. This means that no matter how many people will be allowed to view the task, only on instance of the activity is created. This is different than K2.net 2003 where the default behavior was to create a physical instance for each destination user.
This can greatly improve scalability as well as allows us to my dynamically control assignment and viewing of tasks. However it means that the K2 definition loses individiual user context (i.e. the K2.ActivityInstanceDestination.User). If you absolutely need this user context then you can simply select "Plan per Destination (All at Once)" which operates exactly as K2.net 2003 did and thus you will access to the K2.ActivityInstanceDestination.User object.
This advanced destination functionality is quite powerful.
HTH.
That's helpful. I understand the need to dynamically control assignments. But ultimately, only one user actually performs the Activity. Once that activity is performed, is there a way to determine who it was and use that information later in the workflow?
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.