It’s been a while since my last post and I apologize for the lengthy absence. It’s not that there hasn’t been anything to say – far from it. It’s just that those quiet moments where random thoughts are massaged into something coherent have been hard to come by lately. That being said, it’s time to jump back into the fray.
A configuration update (patch) is a vital tool supporting the recommended Software Development Lifecycle (SDLC) in that it is the primary means by which you are able to deploy configuration changes made in your development environment to your test environment for verification and ultimately to production.
What can be included in the configuration update is nearly anything that is considered “definition” rather than “content” within the site. This includes, all work done in Project Type Center, Custom Data Type Center, Custom Searches, Page Templates, and, new in Click Portal 5.8, Web Service Interface definitions. There are still a few configuration elements that are outstanding, such as Scheduled Background Task definitions, Site Policies and eQueries, but what is supported is still a long list.
What is not on the list are elements of the site that are considered content rather than configuration. These include Persons, Organizations, and Site Pages. While it’s difficult to imagine the need to source control Persons and Organizations, the topic of wanting to manage the entire site structure via a patch has come up a few times. I don’t expect this to be formally supported any time soon, but that doesn’t mean you can’t accomplish your goals. Through the use of the ability to include migration scripts within the patch, there really isn’t anything you can’t accomplish with a bit of code.
To help you along, I’ve posted the source code for a utility method that you can add to CustomUtils (or any of it’s subtypes) as a per-type method. This method can then be invoked from an in-store (either pre or post-patch) migration script method that you define your patch to call. Here is a brief summary of the method:
Description:
This method is called by post patch internal migration scripts to expose new reports to the users. It creates a new page using the specified template and places it in the site as a subpage of the specified parent page.
Assumptions:
The user calling the method has the rights to create a new page in the site. Ideally the user will have the Site Manager role.The parent page has the Pages component on it already.
Input Parameters
parentPageID String
This is the ID of the page which for which the newly created page will be a child.templateID String
This is the ID of the template that the newly created page will use.pageName String
The name of the new pagepageDescription String
The description of the new pageuserRoleList String
A | (pipe) delimited string of User Role IDs to be used to set
use permissions on the new page. If null, the parent's permissions will be usedrequestedDisplayOrder Integer
The display order of the new page in the list of pages presented in the parent page. If <= 0, it will be se to 1, if greater than the largest current displayOrder it will be 1 greater than the largest number.
Return value: newReportPage Container
You can download the source from my Blog page on ClickCommerce.com.
Cheers!
No comments:
Post a Comment