I've gone through a few of these 100 lvl classes on the K2 portal:
portal.k2.com > K2 University > 100.IAH Building Workflow Solutions with K2 Studio (Fundamentals)
Are you trying to build a workflow behind a SharePoint list?
Thanks for the reply daerne. Yes, I've done those videos, and I understand how to send an email from a workflow, create a task from a workflow, etc. But I still don't understand how to a) log comments to the workflow history list or b) instantiate local variables for use within a workflow. I'm looking for more comprehensive info than the videos provide.
I will be happy to provide you with my response but I'm still pretty new to K2 myself. I intend to creep this topic to see what other responses you get.
@jw wrote:
- In K2 Studio, how do I log statements to the wokflow history list?
I had asked a similar question to K2's consultancy service when I first started and they advised me to make a SharePoint List (which I named "Workflow Task History") and just add SharePoint List Events in my workflow to add a new List Item for each step of the workflow. Or at least that's what was previously done here and they said that was a typical solution their customers did. I've never been a fan of it and I am eager for another solution.
@jw wrote:
- in K2 Studio, how do I instantiate local variables?
I think this might depend on what you hope to accomplish, and I don't know if it's true of K2 Studio, but in K2 Studio for Visual Studio in the Object Browser I use data fields for this purpose. Click on the "Process/Activity Data" tab and they're under "Data Fields". You can make activity variables by expanding to the appropriate activity > right click > Add. Or you can click on the process name for process variables and do the same.
I found this on the documentation
http://help.k2.com/helppages/k2blackpearlUserGuide4.6.4/webframe.html?reference-processactivitydatabrowser_adddatafield.html#Reference-ProcessActivityDataBrowser_DataFields.html
http://help.k2.com/helppages/k2blackpearlUserGuide4.6.4/webframe.html?reference-processactivitydatabrowser_adddatafield.html
Hello you can also have a look at the following documents for help:
About K2 studio: http://help.k2.com/en/K2blackpointUserGuide4.6.4.aspx?page=what_is_k2_studio.html
About log statements:http://help.k2.com/K2blackpearlGettingStarted4.6.4.aspx?page=auditlog01.html
About instantiate local variables: "K2 ENVIRONMENT LIBRARY"
" K2 blackpearl Best Practices"
Hope this helps!
Victoria is absolutely correct on the workflow history. Using a Smartobject whether it be SharePoint or SQL Studio to store this history is a good idea. It gives you complete control over what you want to store and avoids K2 database bloat. There is no reason to store that data in the K2 DB.