Skip to main content

In k2.net 2003 I could use Ctrl-F on the K2Studio design canvas, and it would open each file containing the searchtext. this was helpful in finding compile errors.


Now in Blackpearl / visual studio, I can't do this any more. I have a C# helpler class that I call from several preceding & succeeding rules, and I've just changed the signature of the method so that I need to change the parameters passed in. But with 75+ client activities, I don't want to open each activity's code files to see if it is in there ... that would be a huge waste of time.


So how can I quickly / easily find these method calls so that I can modify them?

Disclaimer: Use with caution and make a backup of your kprx file before doing this.


The kprx file is really just an XML file, containing everything that the K2 server will execute, including the rules defined and their code. So you should be fairly safe to open your kprx in Notepad++ or your text editor of choice and do a find and replace on your old and new method signature.


Thanks, DC. That was a great time saver.


I couldn't figure out how to identify which activity these code items belonged to ... did I miss something, or is it not possible to determine which activity contains a specific code item?


It's not that straight forward, but with some patience one can get to the activity or event the code belongs to. You will see all code items live within a container, but it's a couple of levels deep. One way I could get to it is to put your cursor in the piece of code you want to trace and then search downwards for the text: "<Parent" - no quotes of course. This will give you the GUID of the parent container.


Next, search for the ID of the parent. The format is different however, by this I mean the parent value is a GUID that contains dashes, but the actual object's GUID does not contain dashes, i.e.:


<Parent ref="55dcaa65-8192-45fd-866c-383eda114dec "/>


<Guid>55dcaa65819245fd866c383eda114dec</Guid>


 


Reply