Service Instances
Service Types are "connectors" that allow K2 to integrate with particular technologies, while Service Instances are configured instances of a Service Type that connect to specific occurrences of that technology. For example: the EndPoints WebService Service Type allows K2 to interact with web services, while an Instance of the EndPoints Web Service must be configured to allow K2 to connect to a specific Web Service at a particular URL, before a developer can create SmartObjects that interact with that particular web service.
Clicking on the Service Instances node displays a list of the registered Service Instances in your environment. You can create, edit and delete instances. You can also generate SmartObjects for an instance, refresh an instance or refresh the instances list.
- Click Add from the Service Instances view.
Click New Instance. The Configure Service Instance page opens.Use the table below as a guideline to configure the new service instance:
Section Field What to do Service Instance Display Name Type a value for the display name of the new service instance. Service Instance Description Type a value to describe the new service instance. Service Instance Service Type The Service Type selected from the previous view will display. You can select a different Service Type from the drop-down if needed. Service Authentication Authentication Mode Select the Authentication Mode to be used for this service instance from the drop-down. This setting determines the security credentials that will be used to connect to the underlying system. See the topic Authentication Modes for more information.
Not all Authentication Modes are supported for all Service Types. Refer to the Service Type documentation for the particular Service Type you wish to configure to see what known Authentication Mode restrictions may exist.- Impersonate: passes the connected user's credentials to the underlying system
- OAuth: uses OAuth tokens to authenticate with the underlying system. This setting requires a configured OAuth resource for the underlying system.
- ServiceAccount: connects to the underlying system using the credentials of the account that runs the K2 application service
- SSO: uses cached Single Sign-On credentials for the connected user. This setting will require you to select a Security Provider that will map an incoming user's credentials to alternate credentials that are accepted by the underlying system.
- Static: use a static username and password to connect to the underlying system
Service Authentication Security Provider The Security Provider drop-down will be enabled when the single sign on (SSO) Authentication Mode was selected. Select the security provider to be used from the drop-down. Service Authentication OAuth Resource Name This drop-down will be enabled when the OAuth Authentication Mode was selected. Select the OAuth resource name to be used from the drop-down.(The Resource is defined using the Authentication section of the K2 management site.) Service Authentication OAuth Resource Audience Enter the OAuth Resource Audience URI to use for OAuth Authentication. This setting is only applicable when using the OAuth Authentication Mode, and refers to the URI used to access a realm, for example https://graph.windows.net Service Authentication User Name This field will be enabled when the Static Authentication Mode was selected. Type the name of the user to be used when connecting to the underlying system. Service Authentication Password This field will be enabled when the Static Authentication Mode was selected. Type the password of the user entered in the User Name field. Service Authentication Extra Type a value for extra connection information. This setting is usually not required unless the authentication mechanism or Service Type selected requires or allows additional configuration. Service Authentication Enforce Impersonation This is a Pass-through Authentication option and is only applicable for the Impersonate and OAuth Authentication Modes. If Enforce Impersonation is not checked and Pass-through Authentication fails for the impersonated user, the service will revert to the K2 Service Account and retry the operation. If Enforce Impersonation is checked, the service will not revert to the Service Account if it fails with the impersonated user. Service Keys (The Service Keys depends on the Service Type selected). Provide the configuration settings that are required or optional for the particular Service Type you are configuring. See SmartObject Services for the more information on the configuration values for each Service Type.
SmartObjects Generate SmartObjects for this Service Instance Select the check box if you want to automatically generate SmartObjects for the new Service Instance. (Whether this check box is selected or not, designers can still create SmartObjects for the underlying system manually using K2 Design tools). - Click OK to register the new Service Instance after providing the necessary values. It may take a few seconds for this operation to complete, since K2 may be performing discovery operations against a large set of entities, and/or generating and publishing SmartObjects, if the Generate SmartObjects option was selected.
You can edit the existing settings defined for a Service Instance.
- Select the Service Instance you want to edit. The Edit button becomes available.
- Click Edit.
- Type or select new configuration values for the instance and click OK. Refer to the table in the section Service Instances for more information on the various configuration settings.
- Select the Service Instance you want to delete. Click Delete.
- Click OK on the confirmation window to confirm you want to delete the Service Instance.
You can tell K2 to automatically generate and publish SmartObjects for a Service Instance. If you have refreshed a Service Instance, you can use this button to generate SmartObjects for any new or changed artifacts in the underlying system. Note that designers will still be able to use K2 design tools to manually create SmartObjects that use the Service Instance, regardless of whether you have generated SmartObjects or not.
- Select the Service Instance you want to generate SmartObjects for. The Generate SmartObjects button becomes available.
- Click Generate SmartObjects.
- The Generate SmartObjects screen will open. Select the required SmartObject you wish to create, update or delete.
- Click OK to create, update or delete the SmartObject.
You may need to refresh a Service Instance to discover any changes that may have been made to the underlying data store. These steps explain how to do this.
- Select the Service Instance you want to refresh. The Refresh Service Instance button becomes available.
- Click Refresh Service InstanceDepending on the size of the underlying data store, it may take several seconds or even minutes for the refresh operation to complete.
The Refresh button provides an updated list of the Service Instances listed. Click the button to update the list to show any new or modified Service Instances since the last time the list was refreshed.