We've been involved in a few larger Groove implementations now and one common theme has been how important it is to be able to integrate Groove with other systems. Sometimes this is just a one-off import from a database, but mostly it is making Groove Spaces work as a part of a larger, ongoing business process. For example:
- Importing customer and contract information from a corporate database into a forms tool that a field sales teams uses to guide their customers through a contract renewal process,
- Building new spaces when a natural disaster strikes
- Copying data out of Groove for searching and indexing.
Here's an example of a Bambuco script.
class FilesToolDemo (GrooveScript):
def Main():try:
space = Groove.GetSpace("Bambuco Samples")filesTool = space.GetFilesTool("Files")
ListFolderContents (filesTool.Root, 0)except e:
print "problem: ${e.Message}"def ListFolderContents (folder, depth as int):
depth++;
// \t is the tab character. When you multiply a string by a number you end up// with the string duplicated that many times. We use this to increase the
// depth of the printed tree of folders and files.tabs = "\t" * depth
print "${tabs}[${folder.Name}]"for file in folder.Files:
print "${tabs}${file.Name}"
for subFolder in folder.Folders:
ListFolderContents(subFolder, depth)This script lists all the files in a given files tool.While the programming langage specifics might not be familiar to you, we've had a positive reception from people used to working with Excel or Access macros.
- The first two lines define the script name and the main procedure for the script.
- After that we get a Groove Space and get a files tool from it.
- Then we jump to another procedure called ListFolderContents which follows the Main procedure
- ListFolderContents prints out a message and then lists all the files in the folder.
- After that it lists all the contents of the folders within this folder.
Easy :-)
Clearly this example isn't very userful - you're very unlikely to have a space called "Bambuco Samples" after all, but there's a great deal more power available and preliminary documentation in the Bambuco Developer Center. Let us know if you want a demo!
No comments:
Post a Comment