Some new photos…

Added a few new photos which you can see to the right or by clicking on Photos above. They include some I took walking around this evening, a couple from a foggy day in the Blue Mountains of Australia, the fort in Oslo Norway which was next to my hotel, the view from the hotel restaurant in Bangkok, Thailand, and a couple from a bar called Rapa Nui I went to this weekend with Meetin Amsterdam. Enjoy.

Using Powershell to manage Alchemy – Add local users to a Role

Today in an Captaris Alchemy class I got an interesting question. One of the students has a customer who wants to use local users instead of domain users when setting up integrated security. Integrated security is where you can authorize users to view databases, folders, and/or files based on the username they are logged in as. Normally associating the database ‘roles’ with domain users makes the most sense, but occasionally there is a need to set up local users. Now the problem is that the Server Console UI doesn’t allow for anything other than domain users. So the only way to add a local user is through the Alchemy API. Before Powershell that would have probably meant breaking out Visual Studio. But now I think it is far easier to deal with. Here is a sample script that will take two parameters: a role name you want to add a user to, and a user name in the format servernameusername.

If you name this script set-roleuser.ps1, then to add the user capabob to the sales role, just runset-roleuser sales capabob. That was easy.

Using PowerShell to Admin Captaris Workflow

The other day I started looking into using PowerShell to help manage Captaris Workflow. The toughest part about coming up with any administration tool is imagining all the different tasks people might want to accomplish. One of the wonderful things about Powershell is that you don’t have to really know the details of how users want to manipulate the information. All you need to do is give the basic building blocks that can then be piped together to make something amazing. That was always the cool thing about piping commands in Unix. None of the individual utilities did much, but when piped together you could get amazing things done.

Anyway, one of the common tasks that Captaris Workflow admins like to do is to move old processes to an archive folder. We can do that via the GUI, but it is a multiple step process. So I created two simple Powershell scripts that will move any file, folder, process, or model from one location to another based on name, id, date modified, date created, owner, original location, and more. And to make it even better the two scripts together add up to 15 lines of code. If you only count the unique lines, its down to 9 lines.

So first off we want to get the list of records off the Workflow Server:

param($user=$(Throw “A user is required…”),$pwd=””)
[void][System.Reflection.Assembly]::LoadWithPartialName(“TeamplateBLL”) |out-null
$s = New-Object Teamplate.BLL.BSession

$f = New-Object Teamplate.BLL.BFileList
$f.SetSession($s) | out-null

[xml]$fld = $f.GetRecords()

return $fld.FileListDataSet.Files

This simply is connecting a session, using that session to get the list of records, then returning that list to the user. The next script just takes the ID of a record and moves it to the ID of another location:

param($FileID=$(Throw “A FileID is required…”),
  $FolderID=$(Throw “A Destination FolderID is required…”),
  $user=$(Throw “A user is required…”),
[void][System.Reflection.Assembly]::LoadWithPartialName(“TeamplateBLL”) |out-null
$s = New-Object Teamplate.BLL.BSession

$f = New-Object Teamplate.BLL.BFileList
$f.SetSession($s) | out-null


So now with these two scripts, which I have called get-wfrecords and move-wfrecord I can do some of the following really cool things:

  • Move all the Processes in Folder 123 to Folder 1:
    get-wfrecords admin | where{$_.type -eq “process” -and $_.parentid -eq 123} | foreach{move-wfrecord $ 1 admin}
  • Show me all the Models created before July 19, 2006:
    get-wfrecords admin | ?{$_.datemodified -lt (Get-Date “july 19, 2006”) -and $_.type -eq “model”} | Select-Object name, datemodified
  • Show me the models, processes, etc with Matt in the name:
    get-wfrecords admin | ?{$ -like “*Matt*”}

To get just one of these done in 15 lines of code in Visual Studio is pretty easy. But to get the many different variations I have in the same number is pretty freaking cool. Basically now I have to come up with methods to output all the different types of things in the system, then think about the different ways admins want to manipulate them. Do any of my readers have any ideas? Anything you want to see?

Developing Datagrabber Scripts with PSPad

One of my colleagues in the US Sales Engineering organization at Captaris built out a great set of templates for using UltraEdit to build out DataGrabber scripts. The problem with it is that I can’t really use it in my classes since I can’t really use UltraEdit without having paid for it for all 12 training laptops. So I wanted to find another similar editor I could use for my classes. I had a few basic requirements:

  • Light & quick.
  • Use of clips or templates that were easy to customize.
  • The ability to plug in a compiler and to view the output without have to change the viewing context.
  • Built-in Hex view for determining line and record delimiters
  • Free or minimal cost.

After trying Notepad2, Notepad++, Programmers Editor, Context, and many others, I found PSPad to offer all that I needed. And figuring out how to make a clip file that could be used to create DataGrabber scripts easily took less than a single morning. So now you just create a new definition file, and press <ctrl><space> to add all of the common elements of a datagrabber script. Now I can create a script in less than 10 minutes. Pressing <ctrl><F9> to compile shows the log file at the bottom of the window. Now I can quickly tweak and re-compile until I get it just right.

For those of you who have no idea what I am talking about, Datagrabber is a component of Alchemy, our archival and records management tool that has been available for more than 10 years. Many of our customers use Alchemy to store customer records in a searchable format, such as invoices and statements. So if they have a mainframe batch that runs every night that produces a single text file with 1000’s of customer statements, the problem is trying to store each as a separate record in the archive. Datagrabber parses the text file into a series of records. It also identifies customer numbers, invoice numbers, names, etc based on a definition file. This definition file is what I am using PSPad to create.

You can find my DataGrabber config for PSPad here along with instructions on how to install it.

Amazing Museums

Many people are lucky when they visit their local art museum once every few years. I was just thinking back on some of the museums I have seen just in the last couple of months. Its actually quite an amazing list. Yesterday I saw the massive sea-going vessels at the Viking Ship Museum and traditional Norwegian homes at the Norwegian Folk Museum, both in Oslo, Norway. Last week I saw aboriginal art at the Art Gallery of New South Wales near the Sydney Opera House and the Taronga Zoo overlooking Sydney Harbour. A couple of weeks before that it was the massive stained glass roof at the National Gallery of Victoria in Melbourne. A week before that it was the Asian Civilization Museum in Singapore, not only a wonderful place to learn of the cultures of the area, but also a lifesaving refuge from the heat outside. In the weeks before that it was the incredible Dubai Museum at Al Fahidi Fort in Dubai, and the Zagreb City Museum in the upper town of Zagreb. This is a fantastic list and one I hope to grow in the near future. In fact, I am looking forward to visiting the National Museum in Bangkok Thailand next weekend. Maybe since I am home I should visit theRijksmuseum here in Amsterdam this weekend. Or maybe a place I haven’t seen like the Netherlands Shipbuilding Museum, and compare what I see the Viking ships from yesterday.