Category Archives: K2

Convert Document to PDF in SharePoint using K2

Requirements

  • SharePoint 2010 Server
    Standard or Enterprise (confirmed, see below)
  • Word Services to be installed, configured and started
  • K2 HostServer
  • K2 for SharePoint

Further Information Regarding this Process

Document Conversion Services uses Word Automation Services which is part of the standard and enterprise CALs of SharePoint Server. The feature is not available in SharePoint foundation – hence it will not work and fails.

K2D4SP simple provides the user interface to use the Word Automation Services API. The document conversion is kicked off asynchronously using SharePoint API.

In a distributed environment, K2 uses the above method. It just calls into API and the document will be converted by SharePoint timer job.

iOS K2 Task List Settings

So this has been bugging me for ages. Whenever I wanted to switch the server settings in the K2 task list on iOS I assumed there was no easy way from within the app, and there isn’t. So I was forced to remove and re-install the app all together.

For some reason I never looked up the “Settings” tab within iOS and then under the K2 application.

So if you want to change your k2 task list settings, simply open up the Settings within iOS, scroll down the the “K2 Task List” and open up that section and hey presto!

K2 smartforms vs. Microsoft InfoPath

There has been lots of talk recently regarding the future of InfoPath and the gist of it is that SharePoint 2013 workflow will not work with InfoPath for interacting with the workflow events, it seems SharePoint 2013 will now deploy standard aspx pages which can be used to interact with the 2013 workflows.

This provide somewhat of a problem as InfoPath can be used rather heavily by some companies (including mine) and this means a difficult upgrade path.

K2 smartforms appears to be a direct solution to this, however it is still in its early versions and has some way to go to provide a rich design and client interface.

http://www.k2.com/blog/k2-smartforms-vs-microsoft-infopath

K2 4.6.4 Released

K2 blackpearl 4.6.4 has just been released which includes the following new features and enhancements:

  • SharePoint Copy and Move
    When moving, copying or updating a document or list item in SharePoint it is now possible to preserve the existing SharePoint document or List Item’s MetaData and version history when using the SharePoint Document Wizard or the SharePoint List Item Wizard. To make use of this new functionality on existing workflows, update the  design templates, open the wizard and make the necessary configuration and redeploy the process.
  • IPC UI and threading
    The IPC Event has been improved by simplifying the mapping of Process  data and XML fields between the child and parent process using a new  grid control.  Asynchronous  IPCs will now follow the same steps as a Synchronous IPC except it will stay Asynchronous. This will prevent duplicate child instances and IPCs will no longer get stuck.

For full details visit the K2 blackpearl website.

K2 ServiceObject with File Property

Some code snippets to help

FileProperty fpropData = new FileProperty("FileData", new MetaData(), String.Empty, String.Empty);
fpropData.MetaData.DisplayName = "File Data";
fpropData.MetaData.Description = "File Data";
this.Properties.Add(fpropData);
public static object ToFilePropertyValue(string propName, string filename, byte[] content)
{
  return (new FileProperty(propName, new MetaData(), filename, Convert.ToBase64String(content))).Value;
}
dr["File"] = Helper.ToFilePropertyValue("File", "foobar.dat", {foobar byte[]});