Skip to main content

Products

Go Search
Home > Products > Pages > ProductTourNoFlash.aspx  

Product Tour

In this tour, we will demonstrate how to build a simple Kivati project that creates a set of SharePoint sites based on data in an Excel spreadsheet.  Although a simple example, this tour will demonstrate how easy it is to create applications quickly using Kivati Studio.  
This Excel sheet is the sheet that we will use to create our sites.  You can see that each site is represented by a row in the sheet, and properties of the sites are represented by columns in the sheet.
To begin, we first will create a project in Kivati Studio.  Click New Project, and type a name and path for the project.
Kivati then gives us a blank project in which to add tasks.  Tasks are the basic unit of work in Kivati.  To create a project, you add tasks to perform the work you want to do and create relationships between the tasks.  When you have added all the tasks you need, you compile and run the project to perform the work.
The first task to add is a task to open the Excel spreadsheet we created.  Start by typing “Open Excel” into the task search pane on the right side of the screen.  A list of search results appears.  Click on the “Open Excel 2007 Spreadsheet” result and drag and drop it to the project diagram.  When you release the mouse, a new task is created.
The next step is to set properties on the task.  Double click the task to open its properties window.  For this task, we need to tell the task where the Excel spreadsheet is.  More specifically, we need to add the spreadsheet as a resource that can be used by the project.
Click on the DataSource cell and click the edit button to open the resource dialog.  Click Add.  Find the Excel file on disk and add it as a resource.  The spreadsheet will appear in the list of resources.  Select it and click OK.
After clicking OK, you will see the spreadsheet referenced in the DataSource property.  We’re now finished setting properties for this task.

After the spreadsheet is open, we want to repeat over its rows and create sites.  To do this, we’ll add a special type of task called a container to the project.  A container is a task that contains other tasks, much like a folder on your hard disk.  Some containers can perform special functions on the tasks contained within them.  In this case, we’ll use one of these containers – the Data Row Repeater – to repeat the contained tasks once for each row in the spreadsheet.  By using this container, we can easily create our sites with a minimal amount of work.

To add the container, click on the Home tab on the ribbon, then click Overview.  Click Add Item.  Using the tree in the dialog, select the “Data Tasks” item under “Containers” and pick Data Row Repeater.  Provide a name for the task and click OK.

The container is now added to the project.  The next step is to establish some relationships between the task that opens the Excel spreadsheet and the container.  Specifically, we want to:

1. Ensure that the spreadsheet is opened before the rows are repeated over.
2. Share the opened spreadsheet data with the container.

The first type of relationship is called a dependency.  A dependency establishes an execution order.  In this case, we want to create a dependency from the Open Excel Spreadsheet task to the Data Row Repeater, thereby telling Kivati that the spreadsheet task must execute first.  To create the dependency, click and drag from near the edge of the first task, and drop on the second task.

The dependency is now created and shown by the solid black line.

The second type of relationship we want to create is called a chained property.  A chained property is a way of sharing data between two tasks.  In this case, we want to share the DataTable property from the Open Excel Spreadsheet task with the DataTable property in the Data Row Repeater.  By doing this, both tasks will be observing the same data.

To create the chained property, click and drag from the first chained property and drop on the second chained property.

The chained property is now created and the tasks can now share data.

Next, we want to add a task to create SharePoint sites inside the Data Row Repeater.  Recall that the Data Row Repeater will repeat its contained tasks once for each row in the spreadsheet, so this task will execute once for each row in the spreadsheet. 

Double click on the Data Row Repeater.  Then, type “Create Site” into the task search pane and drag and drop the first result onto the project diagram.

Double click the Create Site task.  It has some properties we can set, but what we really want to do is set these properties based on data in the Excel spreadsheet.  This is easy to do using chained properties.
On the ribbon’s Task tab, click Chained Property Diagram to display the Chained Property Diagram view.  This view allows you to set chained properties easily for tasks that aren’t in the same container.  You can see that the view displays the task we are editing (highlighted in red) along with its parent container (the Data Row Repeater).
In this case, we want to create chained properties from the Data Row Repeater’s CurrentDataRow property to the WebTitle, WebDescription, and WebUrl properties.  CurrentDataRow holds a reference to the data row that the repeater is currently considering.  By chaining data from this property, you can give context to tasks such as the Create Site task. 

Although the chained properties have been created, they can’t be used immediately because the properties on either end of the chained property have different data types.  You must apply a transform to the chained property to convert it from a DataRow object to a string.  In this case, the transform you’ll use to do this will extract a cell from the data row and provide it to the target property.

Click on a property in the diagram.  Then, click on the Chained Property tab on the ribbon and click Edit.  The Chained Property Editor dialog will appear.  Add a transform by picking it in the list at right and dragging and dropping it on the diagram on the left.  To tell Kivati what column to retrieve, click on the transform (in blue) and type the column name in the parameter field at the bottom of the window.  You should repeat this process for the other two chained properties.

The project is now complete.  To build it, click the Home tab of the ribbon and click Build.  When the build is successful, click Execute on the Home tab of the ribbon to run the project on the local SharePoint server.

When the project has finished running, you can open SharePoint to see the results.  Here, you can see that the project has created the three sites defined by the spreadsheet.

Although this is a simple example, it should give you a good idea of the types of things you can do using Kivati Studio.  Why not give Kivati Studio a try today?

Copyright 2005-2008 Kivati Software, LLC.
Home| Support| Terms of Use| Privacy| Legal