Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Passing configuration data into a Participant?

I have several Advisors and Participants and I would like to be able to have a "common" one that can get values passed in that are configured in the project XML.  In this way, the value passed in can be changed without going through the process of redeploying the participant, which for me is a difficult process in production since it requires a restart which doesn't occur very often (cuz it is production).

Is there a way to somehow put something in the Project Area XML that then gets passed into the OperationAdvisor or OperationParticipant that it can get ahold of during the run() method?

Thanks!

0 votes



One answer

Permanent link
yes,

here is what I pass to my approval injector
<operation id="com.ibm.team.workitem.operation.workItemSave">
<followup-action xmlns="//// description="..." id="..." name="sdApprovalInjector"">                             
     <approvalbyrole workItemType="defect" approvaltype="review" oldSstate="In Progress" newState="Review"  role="reviewer" label="Code Review"/>                       
     <approvalbyrole workItemType="defect" approvaltype="verify" oldSstate="Implemented" newState="Verifying"  role="QA"/>
     <approvalbyrole workItemType="defect" approvaltype="Approve" oldState="Verifying" newState="Verified"  role="Scrum Master"/>
     <approvalbyrole workItemType="story"  approvaltype="review" oldSstate="new" newState="in progress" role="QA"/>                       
     <approvalbyrole workItemType="story"  approvaltype="Approve" oldSstate="in progress" newState="implemented" role="Product Owner" label="Product Owner Approval/>       

     <approvalbyuserid workItemType="defect" approvaltype="review" oldSstate="In Progress" newState="Review"  userid="sam" label="Some weird review"/>                       
     <approvalbyuserid workItemType="defect" approvaltype="verify" oldSstate="Implemented" newState="Verifying"  userid="bob@strawberry.farms.com"/>
     <approvalbyuserid workItemType="defect" approvaltype="Approve" oldState="Verifying" newState="Verified"  userid="pete@foo.com"/>
     <approvalbyuserid workItemType="story"  approvaltype="review" oldSstate="new" newState="in progress" userid="mary@test.net"/>                       
     <approvalbyuserid workItemType="story"  approvaltype="Approve" oldSstate="in progress" newState="implemented" userid="boss@test.net"/>      
               </followup-action>

code
                            // loop thru the approval config records                           
                            for (IProcessConfigurationElement selement : participantConfig.getChildren())
                            {
                                // should only be for one of our specific names
                                if (selement.getName().toLowerCase().startsWith(APPROVAL_NAME.toLowerCase()))
                                {
                                }
                            }

I created a special class to handle user mismatch of cause

0 votes

Comments

and for sharing info collected with one, you could create a 'service' that the others connect to to retrieve the data. the service is just another plugin. you could package with the participant.

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Sep 10 '14, 12:31 p.m.

Question was seen: 2,999 times

Last updated: Sep 10 '14, 5:28 p.m.

Confirmation Cancel Confirm