Skip to main content

I'm trying to find out if there is a way to determine how I (K2) got to an Activity.  For instances, I have a Review Activity that have multiple line rules pointing to it from various other Activities.  Is there a way to determine which line rule succeeded in bringing me to the Review Activity?  Thanks.

You can do this visually by opening the K2 Workspace and clicking on the ViewFlow diagram icon and inspect the color of the lines.  Look for the green lines leading into your Review Activity.


-mike


Sorry, I should of been more clear with my issue.  From a programming stand point, is there a way to know in say the Destination Rule using the K2 object, which line rule was executed to bring me to that point?

You can add a DataField to your process say "PathFollowed" and within the code to all of your possible lines place K2.ProcessInstance.DataFields["PathFollowed"].value = "NameOfLine".  The later on the process you can query this field and see what previous path was taken.


-mike


Good suggestion Mike, I could even use this as a "bread crumb" trail.. so instead of datafield = linename..  use datafield += ", " + linename

Reply