Skip to main content

Hi,


I'm struggling with how to do some things in Blackpearl that were quite easy in k2 2003.  Namely, I have a doc library with a column named "need approval" that is defined at document upload.  I have 2 line rules that branch out of the start activity that leads to two different activities.  When I go to the properties if the line rule to define the condition, I do not see the "need approval" metadata field in the k2 object browser when I expand the name of the library under "xmlfields".  What am I missing and how can I define the activity destination based upon the value of that sharepoint column value?

I am not sure why those metadata fields are not there but what you can create a smartobject for each of the libraries and lists on a sharepoint site which you can query in the line rule to retrieve this information.  To create the serviceobjects for your site automatically click on the site actions dropdown on you site and select "Update SmartObject Service Definition". Now when you go to create a smartobject you will have a serviceobject definition for each list on the site that you can use to populate your smartobject and then use the load method of that smartobject to get the value. 


There main advantange to this approach is that the data is real time.  With the 2003 approach you would need to have a document library event to re-sync the list with the fields in the K2 process if the metadata changes.  With the smartobject approach you never have to sync.  Each time you need the data it will query the list automatically and use the latest values.


 I hope this helps.


-Eric


Do you see other fields from that library?
The smartobject technique worked, thanks.  As for seeing other fields, all I see are the default system ones.

I only see the default system ones as well...I am not sure if that is a known issue or by design.


Well, I'm hoping it's a known issue because though the Smartobjects technique worked, it's way overkill (both in terms of time and complexity) when you just want to use a SP metadata field in a line rule.  This was something that was soooo easy and quick to do in 2003...
I would be interested to see if the upcoming service pack 1 includes this.  I will have to try it out.  Jason can you post a little more detail about the process so i can try to repro it?
Sure, very easy to quickly reproduce. Create a doc library and create a column called say "accounting approval" with type "choice" and yes/no as possible choices.  Then create a Sharepoint worklfow integration process/project that points to this library.  Create two line rules off of the start activity, go to the properties of the line rule, then try and find the "accounting approval" in the xml node of the library of the object browser.  All you'll see are the default system columns.  This drove me absolutely nuts as I couldn't figure out how to send the workflow down two different paths based upon whether the submitter checked "needs accounting approval" or not.  It was something that took two seconds and was a non-issue in 2003..

Reply