TRIGGERS in RTC
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?
2 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
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.
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.