TRIGGERS in RTC
Ken Creager (65●4●22●20)
| asked Aug 24 '10, 8:09 p.m.
edited Mar 18 '14, 12:39 p.m. by Patrick Remington (201●3)
In most SCM tools you can implement triggers to do stuff, either to process or the files themselves. For example, BEFORE allowing a DELIVER to be completed, I want a TRIGGER to look at all the source code files in the change set and verify a COPYWRITE statement in the file, maybe even add it to the file if it's not there?? How can I do this in RTC, it's relatively simple in ClearCase? Maybe I need to RUN Code Collaborator, or some other home grown tool to get SLOC before I deliver?
|
4 answers
Ken, look for advisors:
https://jazz.net/wiki/bin/view/Main/RTCSDK20_ProcessPreConditionExample https://jazz.net/wiki/bin/view/Main/PreconditionFollowupCreation https://jazz.net/wiki/bin/view/Main/TeamProcessDeveloperGuide#Adding_New_Operation_Advisors Source of an Advisor (example): https://jazz.net/wiki/bin/viewfile/Main/RTCSDK20_ProcessPreConditionExample?rev=2;filename=advisor-example.zip |
Note that there's a built-in advisor (aka precondition) for checking file content on deliver.
Try: - open the project area editor - select the Process Configuration tab - select Team Configuration / Operation Behaviour - click the table cell for the Source Control / Deliver (client) operation and the Everyone role (or some other role) - ensure the "Preconditions and follow-up actions are configured..." option is checked - under Preconditions, click Add... - double-click the Required Content item - fill in the File pattern and Required text fields - click Apply changes - File > Save In 3.0, this precondition has been moved to the Deliver Phase 2 (server) operation. This was done (along with some other preconditions) so that the checks can be done server-side and thus applicable to all clients, not just the Eclipse client. Comments
Daniel martin
commented Mar 14 '14, 11:51 a.m.
Nick,
Is there a way to enforce this across the board? We have thousands of PA in 8 instances of RTC. We need to prevent people from checking-in/deliering jar, ear war, etc across the board. We also need to prevent them from turning off that pre-condition.
From the instructions above I have confirmed that I can prevent the delivery of a jar file, but there is nothing to prevent a "product owner" from removing that pre-condition within the process configuration. Is there a way to enforce this rule?
|
Triggers in RTC are implemented as Operational Advisors (Pre-Op Triggers) or Follow-up Actions (Post-Op Triggers). If you don't want to use the out of the box ones provided like, Nick mentioned. You have to write your own and it requires Java development experience and knowledge of the RTC APIs. It is much more involved than ClearCase Triggers and can only be written in Java. Once written they require a server restart to install or to make updates.
Comments
Daniel martin
commented Mar 14 '14, 3:33 p.m.
Thank Robert,
We have the skills and the knowledge of the RTC API. I was hoping for a quick, seamless capability for such a basic piece of functionality.
Robert Carter
commented Mar 17 '14, 11:15 a.m.
Process advisors are controlled at the project or team area level. You have the option of changing the template in which you create your project areas to include the process advisor enabled at project creation. In addition, you can change the permissions at the role level so "people of a certain" role can only change the advisor. This may help since you have lots of users.
Daniel martin
commented Mar 18 '14, 4:48 p.m.
I am quite familiar with team/PA level configurations. However, for an enterprise tool, some things can not be managed at that level. Triggers ( pre/post actions) are some of those items that should be managed at a higher level. We have nearly 22k developers, and over 4k PA. We do not have the time/bandwidth to manage pre-conditions and follow-ups at the PA level.
For an application to truly call itself enterprise we should be able to roll-out changes and enforce common requirements with ease across the 12 instances of rtc we have to support. This capability is lacking in the tool, and attention should be paid to the deficiency
Robert Carter
commented Mar 19 '14, 9:48 a.m.
Some possible suggestions, write an enhancement request in Jazz.net to say "Add another action under permissions for PA and TA" Then you could use the roles property to control who can add/update/delete advisors.
Project Templates are the way to enforce policies across the enterprise. Templates can have process advisors already included. You may have one or more templates that are reused across the enterprise. Also, in 4.0.5, there is a new feature in the Project Area editor where you can "copy existing configurations" to between project areas in the "preconditions & Follow-up Actions" sub-section. You could create a master project that other projects could "pull" these configurations.
Here is the IBM Help on the topic:
|
The topic at https://jazz.net/help-dev/clm/topic/com.ibm.jazz.platform.doc/topics/c_behavior.html describes preconditions and follow-up actions.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.