How to prgramatically access the destination rule in a certain activity before we reach that activity.
It's impossible to access the destination rule unless you are within the context of that activity.
this is how K2 blackpearl works by design.
thanks alot 7abeeb 2lbi.
it's nice to notice that some brothers master k2.
Yousef is correct about technically not being able to "look ahead" at a destination rule. However in cases where I've needed to do something like this, I have used a SmartObject to return a set of users that are then used in the Destination Rule of that specific activity. This then allows me to invoke this SmartObject from anywhere in the process.
For example... I create a smartobject called "MyUsers" that exposes a property called UserName (that is a DomainUserID). This SmartObject can be a SmartBox, SharePoint....). In my activity destination rule, i invoke the GetList on this SmartObject and leverage the UserName property as the basis for my Destination Rule. K2 is intelligent enough to determine that this is a List of usernames and will assign the tasks accordingly. If in earlier parts of the process i need to know who would be assigned the tasks at a specific step, i can then simply invoke the same SmartObject method.
HTH.
Dear Bob
is there a walk through to show me how to do this; the idea of having a smart object that interacts with destination rules and workspace roles is hard to imagine. can you support one?
Gents, refer to this blog for this topic http://blogs.inobits.com/Yousef/post/Getting-Role-Users-from-a-SmartObject-method.aspx
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.