Working Out with KURL! Shayne Koestler Kinetic Data

Preview:

Citation preview

Working Out with KURL!

Shayne KoestlerKinetic Data

22

Questions Welcome

33

KURL

44

KURL

Kinetic Uniform Request Language

KURL is a domain-specific language (DSL) written in Ruby

DSL Example

=MIN(A2:A7)

DSL Definition

A language designed to solve a specific set of problems

KURL is designed to define service items in Kinetic Request

55

KURL Uses

Additional form of development

Text editing rather than point and click

One big save opposed to many small saves

Acts as an export format

Human readable

Easy to keep under version control

66

KURL Uses

Automate Service Item Development

KURL code is a serialized format for service items

Service items can be exported into the format

Data from external sources can be converted into this format

77

KURL DSL

Set of functions that model Kinetic Request service items

page – defines a page element

event – defines a javascript event

A few more

Functions are made available in specific contexts

question within page

choice within question

88

KURL DSL

KURL Guide

On Kinetic Community

Provides a complete list of functions available

Details all options for these functions

Details which functions are available in which contexts

99

KURL Files

kurl.jar

Builds service items from KURL code

Retrieves KURL code for service items

YAML config file

Often named config.yml

Configures connection to Remedy server

Can be generated automatically by kurl.jar

1010

KURL Files

Library files

Required to make API calls to Remedy

.dll (Windows) or .so (Linux)

KURL code files

Contain the KURL code of a service item

.rb file extension (Ruby)

1111

kurl.jar

Help

Displays usage details of the kurl.jar

Lists functionality provided by the kurl.jar

1212

kurl.jar

Version

Lists the version of the kurl.jar

New versions are released to accommodate new versions of Kinetic Request

The latest version is 2.1.1

1313

kurl.jar

Setup

Recommended method for configuration

Prompts for configuration values

Generates YAML configuration fileNamed config.yml In current directory

1414

kurl.jar

List Catalogs

Lists all catalogs in the Kinetic Request application

1515

kurl.jar

List Service Items

Requires a catalog name

Lists all service items in the given catalog

1616

kurl.jar

Retrieve Service Item

RequiresCatalog nameService item nameOutput directory

Generates the KURL code that defines the given service item

Saves KURL code to a Ruby file in the given directory

1717

Build Service Item

RequiresFile name

Builds service item in Kinetic Request from KURL definition

kurl.jar

1818

Retrieve Catalog

RequiresCatalog nameOutput directory

Builds KURL code for each service item in catalog

Builds KURL code for catalog itself

kurl.jar

1919

Build Catalog

RequiresDirectory containing KURL definitions

Builds catalog and service items in Kinetic Request fromKURL definitions

kurl.jar

2020

Problem

Service catalog under development

Standards are well defined

New requirements dailyAdditions to service itemsNew service items

2121

Solution

Automate development with KURL

Gather requirements in a spreadsheet

Use spreadsheet data to construct KURL code

Execute KURL code to build service items

Could run this for every new requirements document

2222

KURL Automation

General process

Create a service item that definesLook and feelDefaults for service item contents

Retrieve KURL code for the service item above

Divide KURL code into small, specific code templatesA piece of KURL code that defines part of the service item

2323

KURL Automation

Template Service Item

2424

KURL Automation

General process

Create an empty file to store KURL code

For each piece of input dataAppend appropriate code template to the KURL code

Build service items with resulting KURL code

2525

Header Footer Text Question Date Question List QuestionHeader Footer Text Question Date Question List Question

KURL Automation

Input Output (KURL code)

Header Footer Text Question List QuestionHeader Footer Text Question Date Question List QuestionDate Question

2626

KURL Automation

HTML Parsing

We haveForm on a websiteCatalog of services or products on a website

We wantGenerate service items from the HTML data above

2727

KURL Automation

HTML Parsing

SolutionRuby program that parses HTML as input and assembles

KURL codeExecute KURL code to build service items

2828

KURL Automation

Catalog Provisioning

We haveCatalog templateSuite of pre-defined service items to choose from

We wantService item that gathers requirements for a new catalogTask process to automatically build the new catalog

2929

Catalog Provisioning

Components

Catalog template

Available service items

Catalog provisioning service item

2 task handlersCreate catalogClone service item

3030

KURL Automation

Spreadsheet Parsing

We haveSpreadsheet with service item requirementsService item that defines standards

We wantGenerate service items defined in the spreadsheet

3131

Spreadsheet Parsing

Components

Spreadsheet with requirements (saved as CSV file)Adheres to a strict format

Script that parses CSV to generate KURL codeContains KURL code templates

3232

Spreadsheet Parsing

Components

3333

Spreadsheet Parsing

3434

KURL Automation

Service Item Request

We haveService item that defines standards

We wantService item to gather requirements for a new service itemTask process that builds the requested service item

3535

Service Item Request

Components

Service item that gathers necessary requirementsNameQuestions

Task handler that assembles and executes KURL codeContains the KURL code templates

3636

Service Item Request

3737

Service Item Request

3838

Questions?

3939

KURL Resources

Files and introduction

http://community.kineticdata.com/60_KURL/Documentation/02_Get_Started

KURL guide

http://community.kineticdata.com/60_KURL/Documentation/03_Guide

Help (support for KURL is handled through our support forums)

http://support.kineticdata.com/viewforum.php?id=11