Before you can use K2 Business Apps, the K2 server needs to be configured to expose a SmartObject as a web service. This can be configured in the K2 Host Server configuration file.
- SSL certificates are installed to allow for HTTPS
- DNS needs to be configured for the SMO Services endpoint
- K2 Business Apps Service Broker
- is installed
- a service type is created
- a service instance is created
- a SmartObject is created
You’ll find the K2HostServer.exe.config next to the K2HostServer.exe file in K2 Installation Directory\Host Server\Bin.
Make sure to create a backup before editing this file.
Open the file in your favorite text editor and look for the xml node
smoServices. The attributes on that element should look similar to the ones shown below. The server can be anything you want, as long as it is in the format subdomain.domain.extension. You don’t have to think about user experience just yet as they don’t need to type this server name in K2 Business Apps themselves.
Example given: a company named ABC uses a DTAP environment and configures this section for their development server. The server could be smoservices-dev.ABC.com.
The sample below shows just one endpoint. The
categoryPath should point to the category where the
K2 Business Apps 1 SmartObject is located. Note that any spaces should be replaced by underscores.
Normally, there are already a bunch of bindings specified in the file, but the two shown below should exist.
<smoServices enableEndpoints="true" enableEvents="true" enableCrossDomainPolicy="false" specialCharacterReplacement="_" scheme="https" server="smoservices.yourdomain.com" serviceRoot="SmartObjectServices" port="443"> <wcf binding="basicHttpBinding" bindingConfiguration="basicHttpBinding+Basic+HTTPS" /> <rest binding="webHttpBinding" bindingConfiguration="webHttpBinding+Basic+HTTPS" /> <managedEndpoints> <static> <endpoints> <endpoint categoryPath="K2_Business_Apps/SmartObjects" alias="K2 Business Apps 1" smartobjectName="K2 Business Apps 1" /> </endpoints> </static> <excluded all="true" /> </managedEndpoints> </smoServices> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="basicHttpBinding+Basic+HTTPS"> <security mode="Transport"> <transport clientCredentialType="Basic" /> </security> </binding> </basicHttpBinding> <webHttpBinding> <binding name="webHttpBinding+Basic+HTTPS"> <security mode="Transport"> <transport clientCredentialType="Basic" /> </security> </binding> </webHttpBinding> </bindings> </system.serviceModel>
Last but not least, save the file and restart the K2 Service.