The process of creating applications using Enterprise Services involves two fundamental steps:

 

Publishing objects as web service methods

Incorporating (executing) web methods, via a URL, in your applications

 

Publishing Objects

Publishing objects in Enterprise Services exposes the object as a web service method for use in applications via a URL.   The generated web method can encapsulate a TM1 View, SQL Query, TM1 Subset, TI Process, and even TM1 API Functions without the application knowing what type of object is being referenced in TM1.   This frees up the application to concentrate on performing user interface and user experience rather than on data management.

 

Enterprise Services allows you to define all of the operating characteristics of working with data objects using a drag-and-drop interface (ESManager).    With ESManager, setting these properties instructs Enterprise Services how to form the URL, structure the requested information that is returned from the web service, as well as how to manage data being written back to the data sources.   All of this is done in advance and centrally, so that the application is freed up from these activities.

 

The following example illustrates how to publish a TM1 view as a web service method.   A similar procedure can also be applied to dimension subsets, TI processes, and SQL queries.  To publish a TM1 view as a web service, follow the steps outlined below (for detailed information on these topics please see the User Guide).

 

hmtoggle_arrow1        Defining the view to publish

Use Cube Viewer in TM1 to create a view that closely resembles the bulk of information that is to be displayed on the form or report.  Get this view to look as close to the final format that you want to display and save it as a public view.

Unlike TM1, typical applications prefer information in a relational format where the data values correspond with the column headings (measures), rather than on the rows.  The following view has the accounts on the rows and the months on the columns.   Although this may appear to be a typical view in TM1 and applications are able to use this data easily, it will however, turn out to be difficult to work with in when attempting to obtain a quarterly total for the Marketing department.

ES - Basic View - Bad

 
The following view contains the same exact information, however, the measures are in the columns and months are in the rows.   This view is not only easy to consume, but Quarterly totals for Cash (1110) can be easily calculated by iterating over the returned data rows.   The remaining dimensions can be configured as needed.

ES - Basic View - Good

 
Once the view is created, it should be saved as a public view.

ES - Save View

hmtoggle_arrow1        Selecting the View

Using Internet Explorer, Chrome, Firefox (or other web browser), go to the URL of Enterprise Services Manager (typically http://servername/ES).

 
When the page loads, you will be presented with a list of cubes that are contained within your server.  Expand the desired cube and locate the saved view created in the previous step.

ES - Cube List

hmtoggle_arrow1        Publishing the View

The next step is to publish the view to the Enterprise Services web service.  To publish a view, check the box labeled Publish View to Web Service and save the view in Enterprise Services with the desired name.  When a view in Enterprise Services is marked as published, any application will be able to access the data from the cube (or other object) using a standard URL call.

ES - Publish View

 

hmtoggle_arrow1        Accessing the Data

Once the view (object) is marked as published and saved, it is ready for use by applications.   In the above example, the view Monthly Compensation will be saved as a method name MonthlyCompensation and can be accessed using a URL in the format similar to the following:

http://localhost/es/esWeb.svc/json/MonthlyCompensation    (for JSON format)    or

http://localhost/es/esWeb.svc/xml/MonthlyCompensation    (for XML format)

You can enter this information directly in a browser to review the data, or click on the Preview button to see the results in either Grid, XML or JSON formats.

ES - Preview

 

 

 

hmtoggle_arrow1   Select the object to be published (exposed) as a web service

Use the TM1 Cube Viewer to create a view that closely resembles the bulk of information that is to be displayed on the form or report.  Get this view to look as close to the final format that you want to display and save it as a public view.
 
Unlike TM1, QlikView prefers information in a relational format where the data values correspond with the column headings (measures), rather than on the rows.  The following view has the accounts on the rows and the months on the columns.  Although this may appear to be a typical view in TM1 and QlikView is able to import this data file easily, it will however, turn out to be difficult to work with in QlikView when attempting to obtain a quarterly total for the Cash (1110) account.

Basic View Bad
 
 
The following view contains the same exact information, however, the measures are in the columns and months are in the rows.  This view is not only easy to load into QlikView, but Quarterly totals for Cash (1110) can be easily calculated with a formula.  The remaining dimensions can be configured as needed.

Basic View

 
Once the view is created, it should be saved as a public view.

Save View