In K2 black pearl service instance is nothing but a service broker used to connect to multiple LOB’s (Line of Business) systems or data bases to get or post the data. Using these Service Instances we will be creating smart objects which will be used in development of workflows and smart forms.
By default, K2 have provided the Service Brokers to connect below LOB’s which we use mostly
To connect to SQL Server Tables & Stored Procedures
To connect to .Net Assemblies/ DLL’s
To connect to Active Directory
To connect to share point lists and libraries.
For the list of all available Service brokers open the SmartObjects – Services – Tester utility which comes by default with K2 installation at path C:\Program Files\K2 Blackpearl\bin
List of service brokers
Now let’s create a SQL Server Instance and go through options available
Step 1: Right Click on SQL Server Service and Select Register ServiceInstance
Step 2: Enter the details as shown in below screen shot
Authentication mode need to be selected as service account to run this instance under K2 service account credentials.
There is an attribute Use parameters for stored procedures for which by default value is true but I have set it as false for knowing the reason please read this Post.
Once provided all Database details and Database Server Details click Next
Step 3: Now provide the service Instance name, display name & description and click Add
That’s it we have completed creating a Service instance for a data base in SQL Server. Now you can expand and see the service instance that we have created under SQL Server Service, you can see all the tables and stored procedure available in the data base.
Now we can use this service instance for creating smart objects.