Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

K2 Connect 5.2 – Long Awaited Update with Support of Clean K2 V5 Environments – New Features and Installation Walkthrough

  • September 22, 2020
  • 29 min read
Mikhail is IT engineer focusing on applications and infrastructure support domains. He works closely with K2 platform and Microsoft technology stack and holds number of certifications from these software vendors.
Mikhail is IT engineer focusing on applications and infrastructure support domains. He works closely with K2 platform and Microsoft technology stack and holds number of certifications from these software vendors.


My previous K2 related post was covering DocuSign integration in K2 5.4, and in this one, we will continue with K2 topics and discuss the brand-new version of K2 Connect component for K2 5.4 platform which has been released this month (September 2020).

K2 Connect 5.2 finally introduces long-awaited support for clean installations of the K2 Five platform with K2 Connect without the need of doing in-place upgrades from legacy product versions. So, let’s have a look at the new features and installation process of this K2 Connect version starting with a quick look at the enhancements introduced in this release.

When it comes to new features, the main thing for this release is the removal of installation dependency on K2 Designer for Visual Studio from the K2 blackpearl 4.7 client tools. In the past, the K2 Connect installer had a requirement to have K2 Designer for Visual Studio from K2 blackpearl 4.7 client tools, which translated into the inability to perform K2 Connect installations on freshly built K2 Five servers without installing K2 4.7 and performing an in-place upgrade of the K2 platform. Now, this requirement has been removed allowing you to perform clean installations of K2 Connect in combination with K2 5.4 servers. This change greatly simplifies the product installation experience as K2 Connect Setup Manager now installs K2 Service Object Designer for current versions of Visual Studio which allows you to design K2 Connect Service Objects.

Additionally, support for Microsoft Visual Studio 2017 and 2019 has been added which comes in handy for those who want to use current and supported versions of Microsoft Visual Studio. It is also worth noting (!) that Visual Studio 2013 and 2015 are no longer supported by this version of K2 Connect (those were supported by K2 4.7 Client Tools).

Last but not least, there is a usecache service key option added into K2 connect service instance properties.

K2 Connect usecache Service Key setting

K2 Connect usecache Service Key setting

When usecache is enabled (set to true), connections to SAP are kept open and this speeds up SmartObjects execution, eliminating the need for getting information about BAPI structure on each execution.

After looking at the main enhancements and changes, let’s have a look at the installation process of K2 Connect 5.2 on a machine with K2 5.4 (5.0005.1000.1) installed. Before starting K2 Connect 5.2 installation, you need to make sure that you have all the prerequisites installed. K2 Connect 5.2 installation prerequisites include the following:

  • K2 Platform Classic 5.4
  • SAP NetWeaver RFC libraries
  • Microsoft Visual Studio 2017/2019 (required for K2 Service Object Designer)

It is worth noting that SAP NetWeaver RFC libraries are not included with K2 Connect nor in any other way distributed by K2, so they must be obtained from SAP Support Portal (SAP portal account is required to download of those libraries). Once you have DLLs downloaded, you must copy them to the correct system folders, i.e. the contents of .zip files for each architecture (32 and 64-bit) containing four files supposed to be copied in the following folders (just remember that 64-bit versions of Windows store 64 bit DLLs in System32 folder whereas their 32-bit counterparts are stored in SysWOW64 folder):

  • The 32bit files – copy to c:\Windows\SysWOW64
  • The 64bit files – copy to c:\Windows\System32

Once you took care of the prerequisites and downloaded K2 Connect for SAP 5.2 installation package, you can extract installation files and either run setup.exe from the extracted folder or use a web splash screen, which will offer you to initiate installation clicking on the “Install” button. In any case, once you start K2 Connect Setup Manager, it welcomes you with an initial page with a (strong) recommendation to disable antivirus software during the installation process:

K2 Connect 5.2 Setup Wizard – Welcome Page

K2 Connect 5.2 Setup Wizard – Welcome Page

The usual second step is the End User License Agreement page, where you have to accept EULA, along with Technical Support and Maintenance License, by means of ticking the “I agree…” checkbox and clicking on the Next button:

K2 Connect 5.2 Setup Wizard – License Agreement

K2 Connect 5.2 Setup Wizard – License Agreement

If you don’t have a supported version of Visual Studio, installation of K2 Service Object Designer will be blocked but it won’t prevent you from installing K2 Connect Server components as demonstrated on the screenshot below:

K2 Connect 5.2 Setup Wizard – Select Components Page when no Supported Version of Visual Studio found

K2 Connect 5.2 Setup Wizard – Select Components Page when no Supported Version of Visual Studio found

This also shows you that you can perform K2 Connect Server installation on your K2 server while running the K2 Service Object installer on the separate developer’s workstation which has Visual Studio installed. For the purposes of this article, we will perform installation of all components on the same machine installing supported (meaning 2017 or newer) version of Visual Studio and selecting all K2 Connect components to be installed on the same machine:

K2 Connect 5.2 Setup Wizard – Select Components Page – Full Installation

K2 Connect 5.2 Setup Wizard – Select Components Page – Full Installation

Once we are past the Select Components page, Setup Wizard will request installation parameters as shown on the screenshot below:

K2 Connect 5.2 Setup Wizard – Parameters Input

K2 Connect 5.2 Setup Wizard – Parameters Input

All the input which requires validation can be validated using “Test” buttons and if validation passes input fields get highlighted in green. Be sure to use a dedicated service account for K2 connect naming it in line with your account naming conventions (this account must have local administrator rights on K2 Connect server which gets verified by the K2 Connect Setup Manager). It is also worth noting that at the time of this writing K2 Connect 5.2 license key request on the K2 portal requires you to select K2 Connect 5.1 as a version of K2 Connect, which can be a bit confusing. Once you click Next at this page K2 Setup Manager validates the database connection (irrespectively of whether you tested it with the “Test” button or not) and if everything is good with it you will be presented with the Configuration Summary page where you can review components which are about to be installed based on your previous selections and kick off the installation process.

K2 Connect 5.2 Setup Wizard – Configuration Summary Page

K2 Connect 5.2 Setup Wizard – Configuration Summary Page

After you clicked Next on the Configuration Summary page, you will just need to wait for a while till Setup Manager completes the required installation steps observing installation progress through the list of the steps and progress bar reflecting status as it goes through each step.

K2 Connect 5.2 Setup Wizard – Installation in Progress

K2 Connect 5.2 Setup Wizard – Installation in Progress

K2 Connect has quite a small footprint in terms of files and initial database size so installation takes just some minutes. Once this process is completed, you will get to the Finished page which ideally contains a green checkbox icon with “Setup completed successfully” status along with the link to installer trace file. In addition to that it contains two checkboxes which are marked by default (see the screenshot below):

  • Launch K2 connect administration
  • Launch K2 connect for Visual Studio extension installer

K2 Connect 5.2 Setup Wizard – Finished Page

K2 Connect 5.2 Setup Wizard – Finished Page

Let’s click on Finish leaving default checkbox selections and proceed with additional configuration steps. Setup Manager will simultaneously launch the VSIX installer to install K2 connect Visual Studio extension and K2 connect Database Update. VSIX installer enables you to install ServiceObjectModel.Composer extension for the installed version of Visual Studio (i.e. K2 Service Object Designer) as illustrated below.

VSIX Installer – Initial Page / Product Selection

VSIX Installer – Initial Page / Product Selection

On the initial page of the VSIX installer, you just select an appropriate Visual Studio version for which you would like to install an extension (in case you have more than one version installed) and click on the Install button. Once installation completes you should get to the Install Complete page which confirms successful installation and enables you to review the install log:

VSIX Installer – Install Complete

VSIX Installer – Install Complete

This extension will allow you to work with K2 Connect projects using Visual Studio and design K2 Connect Service Objects using K2 Service Object Designer for Visual Studio. Below you can find two screenshots showing this extension added in Visual Studio 2019.

Visual Studio 2019 – Create K2 Connect Project

Visual Studio 2019 – Create K2 Connect Project

Visual Studio 2019 – K2 Service Object Designer

Visual Studio 2019 – K2 Service Object Designer

K2 Connect Setup Manager also opens the K2 Connect Database Update dialog, which seems a bit strange thing to get when you doing a clean K2 Connect 5.2 installation and your K2 Connect database has been just created.

K2 Connect Database Update

K2 Connect Database Update

I’m not 100% sure what is being done on the “K2 Connect Database Update” step but as soon as you click on OK there it closes immediately and you get to the K2 Connect Server configuration window shown below:

K2 Connect Server Configuration

K2 Connect Server Configuration

Here we need to configure the K2 Connect destination clicking on the Configure Destinations link in the bottom left corner of the window. SQL connection and Licensing settings were configured during setup and we won’t be performing Cluster Configuration as we perform single server installation. Once we click on Configure Destinations it opens K2 connect Destination Explorer. Here we just right click on Connectors and select an option to add a connector as shown below:

K2 Connect Destination Explorer – Add Connector

K2 Connect Destination Explorer – Add Connector

Clicking on the “Add” option will open a dialog where you need to specify the connector name and path as shown below:

K2 Connect Destination Explorer – Add Connector

K2 Connect Destination Explorer – Add Connector

For Connector Path, you just click on a standard browse icon next to the respective field which opens the Connector folder in Windows Explorer (C:\Program Files\K2 connect\Connector) where you need to select SourceCode.ServiceObjectModel.ERP.Connect.dll file. As this file is a standard DLL which ships with the product it is not very clear why it is not pre-selected by default for us. The rest of the fields (Description and Company Info) are optional, so we just click on OK after filling in the Name and Connector Path fields. This should bring up a dialog asking whether we want to import shared destinations where you should click No as it is not necessary when performing single server installation (this import is necessary when you have multi-server/farm installation and installing your second server so that connection(s) created there are imported on a new server).

K2 Connect Destination Explorer – Shared Destinations Import Prompt

K2 Connect Destination Explorer – Shared Destinations Import Prompt

Once you click No in the import shared destinations pop up, we are back to K2 Connect Destination Explorer with newly created connector visible under Connectors which enables you to select an Add System option from its context menu as shown below:

K2 Connect Destination Explorer – Add System

K2 Connect Destination Explorer – Add System

After clicking on the Add option you will get a pop up where you have to enter a system name (see the screenshot below).

K2 Connect Destination Explorer – Adding System

K2 Connect Destination Explorer – Adding System

After typing in system name and clicking OK you will be back to the K2 Connect Destination Explorer window where you will see newly added system. Now you need to open the system context menu to select an add destination option as shown below.

K2 Connect Destination Explorer – Add Destination

K2 Connect Destination Explorer – Add Destination

After clicking on Add Destination you will need to fill in the destination name along with your K2 Connect connection string as well as specify whether you want to enable logging and log files path. SAP connection string should have the following format:

You can find a sample screenshot of the add system dialog with the settings filled in below.

K2 Connect Destination Explorer – Add System

K2 Connect Destination Explorer – Add System

Once you have entered all the system details you can click on the OK button and you will be offered to test the configured connection:

Test configured connection

Test configured connection

Click the Yes button in the test connection prompt – if everything has been specified correctly you will get a login credentials prompt shown below. If you included user and password information in the connection string you can tick use predefined credentials and then click on the OK button:

K2 Connect Destination Explorer – Login to Destination

K2 Connect Destination Explorer – Login to Destination

In case you didn’t take care about installing SAP NetWeaver RFC libraries prerequisite you may get a “Cannot call NetWeaver RFC API” error:

K2 Connect Destination Connection – Connection Test Failure due to Missing SAP NetWeaver RFC libraries

K2 Connect Destination Connection – Connection Test Failure due to Missing SAP NetWeaver RFC libraries

If this is the case, you just need to obtain SAP NetWeaver RFC DLLs and drop them into required folders and try again (no restart of any services is required after placing DLLs into the right locations). If prerequisites are in place and the connection string was specified correctly you will get “Connection tested successfully” pop up as shown below.

K2 Connect Destination Connection – Connection Test Success

K2 Connect Destination Connection – Connection Test Success

So, through this three-step process, we created connection, system, and destination and you should see those objects in K2 Connect Destination Explorer (see screenshot below). When you have more than one destination configured assign your Default Destination by means of accessing the Destination context menu and clicking on the “Set as Default Destination” option. Configuring default destination has special importance when working with multiple SAP Service Instances as out-of-the-box integration via Visual Studio and the K2 connect Administration tool is making use of one Service Instance. That Service Instance can point to any single destination (but only one) and it is determined by the default destination at the time the Service Instance is refreshed, it will also create a Security Label which corresponds to the Destination (i.e. to get security label for the instance created you need to set its destination as default and refresh the instance).

When you create the first destination it becomes the default one which is indicated by the red color used for the destination name as shown on the screenshot below.

K2 Connect Destination Explorer – Connector, System and Destination Added

K2 Connect Destination Explorer – Connector, System and Destination Added

At this stage, we are done with configuring K2 Connect settings and can switch over to K2 Connect Administration (shortcut to launch it can be found in the Start menu) and register the K2 Connect service instance by means of opening the K2 Settings window and clicking on Register Service Instance link in the bottom right corner of K2 Settings window. Before clicking on the Register Service Instance link, we will switch SAP Authentication to Static Credentials which will allow the credentials of the Service Instance to be used to authenticate against SAP. This authentication option is sufficient for testing purposes but is not always acceptable for real-world use cases as when using this option all communication between K2 and SAP will happen in the context of a static service instance account with all users having the same level of access and SAP not having the context of the user requesting the data.

K2 Connect Administration – Register Service Instance

K2 Connect Administration – Register Service Instance

Once you click on the Register Service Instance link, you will get a pop up confirming successful K2 Connect Service Instance registration (providing credentials were specified correctly and all K2 services are running):

K2 Connect Administration – Service Instance Successfully Registered

K2 Connect Administration – Service Instance Successfully Registered

You can click OK twice to close instance registration confirmation pop-up and K2 Settings windows and navigate to K2 Management or to SmartObjects Services Tester to see registered K2 Connect service instance and its properties:

K2 SmartObjects Services Tester – K2 Connect Service Instance

K2 SmartObjects Services Tester – K2 Connect Service Instance

As it was mentioned at the beginning of the article, the usecache service key is available in the Service Instance properties, and it can be enabled to keep the connection to SAP open and speed up the execution of a K2 Connect SmartObjects. As explained in the product documentation this service key defines whether or not the service instance caches or releases the connection to SAP.

Once K2 Connect service instance is registered you can refresh it either in the K2 Connect Administration tool > K2 Settings UI (the same UI we used to create it, once Service Instance is registered “Register Service Instance” link there changes to “Refresh Service Instance”) or in Service Object Designer in Visual Studio. K2 SmartObjects Services Tester and K2 Management also allows you to do that, but two previous options are your primary K2 Connect UIs. In the case of Visual Studio 2019, you can find K2 Service Object in the View menu as shown below:

Visual Studio 2019 – Invoking K2 Service Object Designer from View Menu

Visual Studio 2019 – Invoking K2 Service Object Designer from View Menu

Visual Studio 2019 – K2 Service Object Designer – Refresh Service Instances

Visual Studio 2019 – K2 Service Object Designer – Refresh Service Instances

This concludes the overview of the installation and configuration of K2 Connect 5.2 on the K2 5.4 server and your possible next step with this product is to learn how to create K2 connect Service Objects and K2 SmartObjects to integrate your K2 solutions with SAP (for details on this you can check out links at the end of this post). I hope this post has been informative and useful as an introduction to K2 Connect 5.2, and in case you have any questions or feedback feel free to leave them in the comments section below.

You can also check out K2 Connect Product documentation if you want to learn about K2 Connect 5.2:

Hey! Found Mikhail’s insights useful? Looking for a cost-effective, high-performance, and easy-to-use hyperconverged platform?
Taras Shved
Taras Shved StarWind HCI Appliance Product Manager
Look no further! StarWind HCI Appliance (HCA) is a plug-and-play solution that combines compute, storage, networking, and virtualization software into a single easy-to-use hyperconverged platform. It's designed to significantly trim your IT costs and save valuable time. Interested in learning more? Book your StarWind HCA demo now to see it in action!