A topic came up recently on an internal distribution list that I have been planning on blogging about. I figured it’s time to get it out to you because it is timely with the release of System Center Orchestrator Beta and future versions coming.
What is so important and why?
We will all need a way to report on what policies in Opalis are currently in process of development and are not yet checked in. Even more important, where they were last checked out and who checked them out last! If they are checked out, they are not saved in the database and will be lost on migration.
Why is this particular topic is so important you ask? Well, as part of your migration strategy to Orchestrator from Opalis, you should have in it your plan to export all “key” workflows and sub workflows so they can be imported into your new Orchestrator environment. You can browse through your Opalis Client and look at workflows one by one and see a padlock on them indicating they are checked out remotely or a pencil if they are checked out from your own machine. The padlock ones are the tricky ones.
So what can we do to find all checked out Policies?
It just so happens that some of this data is stored directly in the Opalis Database. Once you get this data, you need to do some manipulation of some data and then extract the data. So what better way to do this than…you got it create another workflow to automate it. I’m going to keep this simple and straightforward and you can take it from here and make it as complex as you want. It is just three simple activities linked together as shown below.
Query Database Activity
Get Account from SID Activity
1: if ($lastModifiedBySid -ne "NULL")
3: $LastModifiedBy = (new-object system.security.principal.securityidentifier($lastModifiedBySid)).translate([system.security.principal.ntaccount])}
4: $CheckOutUser = (new-object system.security.principal.securityidentifier($checkedOutUsersid)).translate([system.security.principal.ntaccount]
Append Line Activity
That’s it! Check it in and run it.
Your results will look something like the following (hopefully you don’t name all your policies “New Policy”)
Final note: The download is provided as an example – use at your own discretion and test first in a lab environment or sandbox to see results.
Downloadable Content Checked-Out-Policies.ois_export
Thanks for following along – if you want to cut to the chase, just download the provided file and import it into your environment, configure the appropriate pieces, and let it fly. I hope it helps with the migration.
Till next time…