How to restrict a follow-up actions (Build On Deliver Participant) work for only specific stream?
I have developed a follow-up actions (Build On Deliver Participant) and I want it should only work for several or particular stream on the project area?Is there any way to configure RTC SCM HOOK (for this kind of feature)under Project Area -> Process Configuration tab ->RTC SCM hook configuration -> Team configuration -> Operation Behavior.
|
2 answers
Ralph Schoon (63.5k●3●36●46)
| answered Nov 29 '18, 6:17 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I might be ignorant, but I am unaware of a Process Configuration tab -> RTC SCM HOOK configuration section. You can also not create such a tab easily as far as I can tell.
With respect to your question, Perform https://jazz.net/library/article/1000 and recognize the labs 4,5 and how to configure operational behavior. Comments
Ralph Schoon
commented Nov 29 '18, 11:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Oh, and I shall add, if the operational behavior finds the object the operation is for is not in the list it should work for, it just exits.
Raj Kumar
commented Nov 30 '18, 1:53 a.m.
Thank you @Ralph Schoon for the quick reply. Now i will add some more information to my question: I developed a RTC SCM extension (i.e: follow-up actions (On Deliver Participant)) . i opened team artifacts view in eclipse ide, then i right click on the project area and i choose open option and then i click on process configuration tab and open the 'Operation Behavior' then i cheek the box for precondition and follow-up action .... and then i go to 'Flow-up action' and click on add button to add my hook (i.e. On Deliver Participant) .
This hook is working for whole project area, and a project area can have many steam and it will be applicable for all the stream.
You can read my answer above and follow its advice.
You can ignore it. What you can not, is expecting I write the same answer again, if you don't read it.
|
In your implementation of IOperationAdvisor, in the run method, you do this:
Object opData = operation.getOperationData();
if (!(opData instanceof DeliverOperationData)) { return; } DeliverOperationData data = (DeliverOperationData) opData;
Now you can check for the stream you care about using: data.getDestWorkspace()
Comments
Raj Kumar
commented Dec 03 '18, 3:46 a.m.
Hello David
I'm writing an operation(com.ibm.team.scm.server.deliver) participant that auto creates a snapshot for a stream after deliver change sets to it. To finish that I'm using the following code(only list the key code) :
IScmService scm = getService(IScmService.class);
WorkspaceItemListResult result = scm.createBaselineSet2(destWorkspace, new IComponentHandle[0], now.toString(), now.toString() + "SnapShot", BaselineSetFlags.NONE, null, null, null);
Currently this operation(com.ibm.team.scm.server.deliver) participant is working for all the stream which are present under a project area. I just want have this as a hook for a particular stream as per user chooses. I don't want to hardcore any stream name here, stream name should be decided by the user in which stream he/she want to feature. how i will do this? via adding some code or some i need to configure?
I should point out, that performing write-operations such as creating a snapshot during an advisor/participant is a non-starter. See: https://jazz.net/forum/questions/254874/auto-creation-of-a-snapshot-after-every-deliver-gives-error-stale-data
Assuming you could do this without problems, you would likely want to write some UI that implements a user interface for your new participant which allows the project admin to add a selection of streams (you would write some stream picker UI). When they hit 'save' in the Project Area editor, It would store the itemIDs (UUID) in the process spec (XML) (similar to how most of the existing preconditions/advisors work). Then the when the server runs the advisor/participant (which is in the code you are referring to above), you would read the process spec to see what streams this should be applicable to, and if it doesn't match, then you just 'return' and do nothing in the code.
Raj Kumar
commented Dec 07 '18, 5:18 a.m.
can you suggest me some UI that implements a user interface( sample implementation) which will help me on this.
Your UI class needs to extend OperationDetailsAspectEditor.
Ex: See: StreamComponentsPermissionAspectEditor
|
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.