Skip to main content
Kinetic Community

Service Items

A new service item can be created by using the service_item function. The service_item function takes one argument, which is the string name of the service item. The service_item function also takes a code block that contains calls to KURL functions to configure and populate the service item.

Service Item Creation

service_item "Demo Service Item" do
  # Service Item configuration is done here...
  # Service Item population is done here...
end

The code sample above will create a service item named Demo Service item. All configuration and element functions called within the code block passed to service_item will be evaluated as well.

Service Item Configuration

service_item "Laptop Request" do
  catalog "Demo Catalog"
  categories "Test, Copy"
  description "Service Item created by KURL"
  web_server "http://127.0.0.1:8081/klink"
  display_page "/displayPage.jsp"
  display_name "displayName"
  header_content "..."
  authentication "..."
  visible_to_group "0;"
  management_group "Public"
  submission_group "Public"
  # Service Item population is done here...
end

The catalog function takes one string argument, which contains the name of the catalog this new service item should belong to. The catalog specified this way must already exist in the Kinetic Request application.

The categories function takes one string argument, which contains the comma separated names of the service item categories that this service item should belong to. This piece of configuration is optional.

The description function takes one string argument, which contains the description of this service item.

The web_server function takes one string argument, which contains the URL of the web server that this service item should use.

The display_page function takes one string argument, which contains the name of the display page (JSP) that this service item should use.

The display_name function takes one string argument, which configures the URL display name of this service item.

The header_content function takes one string argument, which contains the header content of this service item.

The authentication function takes one flag and one option depending on which flag is used. The :default flag sets the authentication type to default. The :external flag sets the authentication type to external and requires the use of the :external_url option. The :template flag sets the authentication type to template and requires the use of the :template_name option.

The visible_to_group function takes ones string argument, which configures the visible to group of this service item.

The management_group function takes one string argument, which configures the management group of this service item.

The submission_group function takes one string argument, which configures the submission group of this service item.

The submission_locking function (Kinetic Request 5.1) configures the submission locking options of this service item.  See Submission Locks for details and examples regarding submission locking.

The attachment function adds an attachment to the service item.  See Attachments for details about this function.

Service Item Functions

The page function (Chapter 3).

The style function (Chapter 8).

The functions listed in the Service Item Configuration section.

Service Item Population

The population of a service item begins with the use of the page function. Within the page other elements can be created to populate that page. To see which functions are available within the page function, see Chapter 3. An example of creating page elements within the service_item function is shown below.

service_item "Service Request" do
  # Service Item Configuration is done here...
  page "Initial Page", :contents do
    # Page element population is done here...
  end
  page "Confirmation Page", :confirmation do
    # Page element population is done here...
  end
end