Featured Image -- 1088

SMS Messaging with K2


This is a really interesting project :)

Originally posted on Simon@K2:


The SMS Service allows the K2 Server to send SMS messages and to also receive text messages. The service also allows for K2 to act upon the content received in the message from simply storing the message, starting a specific workflow by texting a specific hash tag and lastly being able to action a task by sms message.

See it in Action

What Do You Need

For this service to work correctly you need to have a subscription to Esendex sms service (www.esendex.com) . You can register for a trial account to start off with. They will give you some sms messaging credits and a mobile number. You will need to make a note of the following information.

  1. Account Number
  2. Username
  3. Password
  4. Mobile Number

What is in the Service

The zip file contains the following components

  1. SQL scripts to create the database
  2. GUID for SQL db. Service Object
  3. Package…

View original 1,298 more words

SMB evolution :)

SMB3 Multichannel explained

Today I found some interesting reading material on networking and SMB, thanks to my attempt to enable SMB3 support on my Synology NAS. There is a really interesting post I stumbled upon – Confessions Of A 10 GbE Network Newbie – Part 4: SMB3, and it contains nice example of that sort of story telling / way of explaining things which I really value so that I even quote it here:

Microsoft’s SMB3 multichannel is perhaps the most significant feature added to the SMB protocol in over 25 years. In simple terms, an older SMB2 connection in Windows 7 can be compared to a single lane highway and data traveling on this highway loaded into a 1995 half ton pick-up truck. A video file uploaded over 10GbE to a server is limited by this single lane highway and the older truck.

SAMBA’s SMB3 gives us the 2013 turbo-charged truck that can travel faster, carry a larger load and use less fuel doing it. Microsoft’s SMB3 multichannel takes this up a notch by adding multiple lanes, so now we can have more of our turbo charged trucks (threads) on the highway simultaneously. Our video file upload carried by these trucks moves much quicker as a result.”


One would say that that type of explanation is something on the verge of oversimplification and imprecision but to my mind there is a dire need for simple explanations in any complex subject and sometimes that sort of explanations can be tricky to come up with.

P.S. For those who keen on all sort of factoids and details: trucks you see on the pictures from left to right are Chevrolet S-10 and GMC Sierra aka Chevrolet Silverado :)

Latest K2 versions and IE8 support

For customers using K2 smatforms it is not a revelation that IE8 is not something fully supported. In fact IE8 support has been imited to end-user runtime execution only – K2 smartforms runtime, K2 workspace (Home Page, Reports Runtime, Worklist and Single Sign-On) and K2 web parts since K2 smartforms 1.0. And IE8 support was dropped entirely starting from K2 smartforms 4.6.9. It seems to be that it was high time to do so as investments in maintaining compatibility with a piece of software originally released back in March 2009 does not seem to be justified.

IE8 About

Those shops where for one or another reason IE8 is still being used would be interested in freshly published K2 KB entitled “Known issues when running Forms or the Forms Viewer web part in Internet Explorer 8 or IE8 Compatibility mode” which gives detailed overview of issues you may encounter when using latest versions of K2 smartforms (4.6.9, 4.6.10) and IE8.

K2 4.6.10 released

So yesterday (24/06/2015) K2 4.6.10 release was revealed for general public and it is now available to all K2 clients in K2 blackpearl downloads sections at portal.k2.com. You may familiarize yourself with product release notes (KB001700) which contains consolidated information about all parts of K2 product suite by contrast with former practice of having separate release notes for individual components (blackpearl, smartforms, control pack etc.). K2 blackpearl 4.6 Compatibility Matrix is updated too.

This is a second release which uses unified versioning for all components and I still think that this change has tremendous impact of simplifying life both for clients and for K2 support. Former versioning system was a bit messy and not often less consumer friendly, but also was a source of frequent confusion and cases when incompatible or poorly compatible components were mixed in one environment. Now it’s plain and simple you have to have 4.6.10 version for all of your components. Period. Really like this – nice and simple how it should be. :)

K2 4.6.10 Prerequisites

Seveneves 05 book spine

Signed first edition of Seveneves

Last friday I received my copy of signed first edition of Neal Stephenson’s latest book Seveneves, delivered from Barns and Noble. I was almost in the middle with my reading of it on Kindle as I obviously get ebook faster (both things were preordered before release). Pleasure was somewhat spoiled by the fact that nice paper book was damaged in transit – looks like package was exposed to water and book I got is not in perfect condition to say the least :(


Some pictures can be found below.

Front cover:

Seveneves 01 Front cover

Neal’s signature:Seveneves 02 Neal's Signature

Picture of Izzy on the back of front cover:
Seveneves 03 Picture behind the front cover

SIDE NOTE/IRRELEVANT DETAILS: By the way once I reached above picture I spend some time pondering what is the word which describes this part of the book, and end up referring to this as “pictures on the back of the book cover”, posting a question on english.stackexchange.com – “Which word can I use to refer to pictures on the backside of the book covers?”  in parallel. Question was answered and it seems that proper word here is “endpaper” :) Though this term doesn’t imply that this part of bock has an illustration on it so it is necessary to use of something like “front endpaper illustration” and “back endpaper illustration”.

Picture of something else on the back of back cover:Seveneves 04 Picture behind the back cover

Book spine:
Seveneves 05 book spine

I will refrain from any comment on the book itself until I done with my reading, but definitely write something afterwards.

K2 blackpearl best practices

Using K2 management APIs within process solutions

I’m currently reading splendid piece of writing entitled “K2 blackpearl Best Practices“, which despite being published very long time ago still not lost its relevance. Just wanted to note one of the points contained in this document:

Refrain from using K2 management APIs within process solutions as the use of these requires that the identity of the user executing the code has administration rights. In particular this includes the management APIs contained within the SourceCode.Workflow.Management, SourceCode.ManagementAPI, SourceCode.SmartObjects.Services.Management, and SourceCode.SmartObjects.Services.SmartBox.Management assemblies, but any assembly with ‘Management’ in the name typically requires permissions on the server that a typical user will not have. Occasionally use of these APIs is required but it should be kept to a minimum.

Just highlighting this as important point as I saw cases where K2 clients tried to use this and expected those things to work without Administrative rights. Just jotting this down along with primary source which mentions this caveat.

Installing SQL Server instance for K2 blackpearl

One of prerequisites for K2 is a SQL Server instance and in this blog post I am just going to walk you through the process of setting up this important part of your K2 deployment.

As with any other product before rushing into installation, you should take your time and do some planning. Good starting point for this is to familiarize yourself with prerequisites and check K2 blackpearl Compatibility Matrix, and in case installation of K2 smartforms is also on your least, do not fail to check with K2 smartforms Compatibility Matrix. As we talking about SQL server part we have special interest in what SQL Server versions are compatible with K2 – and you can find it Microsoft SQL Server section of K2 blackpearl 4.6 Compatibility Matrix. If you have a luxury of choice for SQL Server version (as a software assurance subscriber maybe) I would always recommend to go for latest version of SQL Server officially supported by K2, and starting from 4.6.8 this is SQL Server 2014 RTM. It is strange to see Azure SQL Server mentioned in K2 compatibility matrix without single one check-mark in respective column. Another thing of note is R2 editions, whenever you see K2 supporting both R2 and non R2 version of Microsoft products you should realize that while both are supported most of the testing being is being done on R2 versions so those are preferable to use. Why use the latest supported version of SQL? Well this is just a common sense, to have access to the newest feature and avoid pain of forced migration due to end of support cycle for older SQL version whether it is coming from Microsoft side or maybe from K2 or being dictated by your corporate standards.

Irrespective of environment type you are going to build I assume that you going for dedicated SQL server machine option. Even for tests you want to have an environment which is close to real world, and thus SQL Server as resource intensive application always being placed on separate machine.

With SQL, especially if we talk about non-clustered single server installation you can get away with “spousal” installation (one where you always say YES/NEXT/OK), but there is some caveats related with K2. K2 requires very specific collation and you want to make sure that you selected it for your SQL Server instance during setup process.

Basically if you check K2 blackpearl Installation and Configuration Guide Technology Requirements section you will be able to find Microsoft SQL Server & Reporting Services requirements where it is stated that Latin1_General_CI_AS is a required collation. Once again, quoting documentation:

Case sensitive databases are NOT supported.
The following collation setting is required: Latin1_General_CI_AS

Do not fail to interpret this required word correctly: using any other collation for your K2 database effectively means running unsupported configuration. This page does not mention that you have to have this collation on SQL Server instance level, but this is a requirement too, and K2 documentation expected to be updated to reflect this.

There is a way to change SQL Server collation without reinstalling SQL server, but what it does – it just rebuild system databases with new collation. And in case you run K2 setup manager and it created your K2 database with wrong collation which was configured on your SQL Server Instance at the time of installation, there is no easy way to change this. You will have to re-create your database with new collation and move all your data into it, this is not supported operation and also not a something you can do easily in a few clicks.

So the most important point is to have your K2 SQL Server instance configured with required collation before you start with K2 installation, as K2 Setup Manager will automatically create your K2 database using collation configured for your SQL Server instance. Note that there is no way to tell K2 Setup Manager to use collation different from collation set SQL Server instance (this is for a reason – K2 extensively uses temp database which inherit collation from SQL Server Instance and those have to match), and even if your selected SQL Service instance has unsupported collation Setup Manager won’t warn you about this.

I am not going to mention each and every step in SQL Server installation here, but mention those which are important. First I would recommend you to create named instance for K2. Yes it mean that you will have to specify instance name added to SQL server name whereas with default instance you can get away with server name only. But having meaningful instance name is more convenient, especially when you have multiple instances under your management, and given the fact that server names in enterprise environments are normally follow some weird naming conventions which are not always obvious/tell you much about what this box supports on application level. So you may want to go for named instance:

SQL Server Creating Named Instance

After that goes important collation settings step which you don’t want to miss or leave unverified. Remember for K2 we have to use only one collation – Latin1_General_CI_AS. See respective SQL Server installation wizard screens below.

Once you reached Server Configuration stage where you need to specify Service Accounts don’t forget to switch to Collation tab and configure it to use K2 required collation. When you switch to collation tab, you will see that bu default there is some collation selected and this selection is based on your base OS language settings. We need to change this by clicking Customize button.

SQL Server Collation 01You should also note that K2 required collation does not have “SQL_” prefix. And it mean that K2 requires use of Windows collation, so once you clicked Customize button on the previous screen you have to do the following selections:

SQL Server Collation 02Once all is selected as on the picture above, click OK and you have set your SQL Server instance to use Latin1_General_CI_AS collation:

SQL Server Collation 03Why Windows instead of SQL collation? “SQL_” collations use SQL’s own proprietary code pages, whereas Windows  collations based on the Windows OS code pages. Windows keeps its collations up to date more often, and compatibility is better for the client applications. Hence the best practice is to use Windows collations, and K2 follows this best practice.

After this you may proceed towards completion of your SQL Server installation.

Assuming you installed your SQL Server instance on separate box you have to configure Windows Firewall rules to allow external connectivity, so that K2 server may access this SQL server instance over the network. This involves configuring 3 rules in Windows Firewall.

First of all you have to take a note of random TCP port which was assigned to your SQL server instance during installation phase. In order to do this you need to go to SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for your SQL Server instances (MSSQLK2 in this example) > TCP/IP and select Properties:

SQL Check Random Instance Port

Take a note of TCP Dynamic Ports value – you will need this to create one of required Windows Firewall rules.

First you have to create a rule for your instance executable:

SQL Firewall Rules 1 Instance Executable

In this inbound rule you allow a program, and specify a path to your SQL Server instance executable – sqlservr.exe. For SQL Server 2014 default location is following: “%Program Files%\Microsoft SQL Server\MSSQL12.YOUR_INSTANCE_NAME\Binn”.

Second rule allows inbound access to your instance TCP port, which you noted earlier:

SQL Firewall Rules 2 Random TCP Instance Port

And third rule which you need to create will allow inbound access SQL Server Browser service, which by default uses UDP port 1434:

SQL Firewall Rules 3 SQL Server Browser UDP 1434This is it for installing SQL Server service instance for K2. Additionally I may recommend you to create SQL Server alias on K2 server which will enable you to connect over short, nice and meaningful alias. And in case you have to change SQL Server machine or instance name it will be absolutely transparent for your K2 installation – you will only need to reconfigure your alias properties, nothing more. Apart from this you may want to adjust/verify SQL Server memory allocation settings and you are ready to go.

Once I get some time I will write up a guide on installing SQL Server Cluster for K2, but as you can see some of aforementioned recommendations are universal for SQL Server instance installation in general, and applicable for example when you installing SQL Server instance for SharePoint (don’t forget that it has its own compatibility with SQL Server versions and collation requirements, though) or any other application.

If you want to know more about SQL Server 2014 installation in general, including such an interesting option as installing it on Server Core refer to Install SQL Server 2014 documentation on TechNet. I guess this is desirable option for lab environments as it saves resources, and in case of production deployment it also means less resources and smaller attack surface for your SQL Server box.