One of the tasks were migrating the customized components, most of them workflow monitors. Creating customized components can be a lot of typing, a boring and repetitive task prone to errors. Wouldn't be cool if one could just do something like a CRTL+C and CRTL+V to all parameters from an Enterprise to another?
That is possible. Well, at least with two operations.
About that time the API of Siebel::Srvrmgr was already usable, so I took a shot to build such automation.
The result is a Perl script named Siebel Srvrmgr Exporter. This little command line tool connects to a Siebel Server and exports components information in the form of multiple CREATE COMPONENT commands to standard output. With that, it is just a matter to connect to the new Siebel Enterprise and execute the same commands for the new servers with srvrmgr program.
Here is the command line help:
The program also includes a simple ASCII animation for the user to avoid the feeling that the application stopped working because it's expending some seconds retrieving data from the Siebel Server.
Siebel Srvrmgr Exporter started as a tool to solve a real problem, and later I had included it as an POC (proof of concept) of Siebel::Srvrmgr API. In release 0.9 of Siebel::Srvrmgr, I had included more features to it:
- Exports only components attributes that have a defined value;
- Exports all components which name that matches a given regular expression;
- Some internal improvements;
Components with "Work" string in their names, with all parameters |
Components with "Work" string in their names, with only the parameters that have defined values |
How does this thing work?
Recently I was showing the tool to a colleague at work and he asked how so I had the patience to type all that information. I found it funny because in fact I had typed quite a few lines of Perl code to do that. By using the classes available at the Siebel::Srvrmgr API, the program:
- Connects to a Siebel Server in a Enterprise;
- Recover each component (that is available in the server) information;
- Recover their parameters;
- Enter in a loop print all the information as a "create component" command of srvrmgr.
Later, by using srvrmgr, you can submit those commands to the new Siebel Server, recreating those components with the same parameters defined before.
And that's it! Two commands:
- export_comps.pl
- srvrmgr
Caveat
There is always one: the parameters that includes passwords are recovered from the Siebel Server as a "****", so you probably will want to change those (a search/replace with your favorite text editor will do) between steps 1 and 2. Maybe I'll implement some feature to ask for a real value before printing the CREATE COMPONENT commands in the future (probably after Christmas lunch, just don't know from which year).If anything fails and you don't know why, make to sure to check the Troubleshoot wiki on the project main page.