It's all about the answers!

Ask a question

Follow up action : Cancel save action and display error message


Antoine LELEU (5012728) | asked Feb 14 '14, 11:48 a.m.
 Hello,

Is it possible to cancel save action on follow up plugin and display  a specific error message.
I'm developping a plugin and i would like implement that.

Thanks
Antoine

Accepted answer


permanent link
Ralph Schoon (63.1k33645) | answered Feb 17 '14, 3:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please see https://jazz.net/library/article/1000
The workshop shows that it is possible to return an error and how. The information is displayed by the various clients.
Antoine LELEU selected this answer as the correct answer

3 other answers



permanent link
Charlie Seo (22127) | answered Feb 16 '14, 6:03 p.m.
I guess that can be implemented by using pre-condition - Advisors. You can detect the save action using ISaveParameter interface and if the action is save, you can trigger further action you need.

Extension point for Advisor would be com.ibm.team.process.service.operationAdvisors and once you got this, you can find save action as below

// Action is save
eg: if (operation.getOperationData() instanceof ISaveParameter) {
           // do action
}

RTC Extension workshop is a good place to get detailed info.

Rational Team Concert 4.0 Extensions Workshop - Library: Articles - Jazz Community Site


permanent link
Antoine LELEU (5012728) | answered Feb 17 '14, 3:02 a.m.
 
Hi Charlie,

Thanks for your answer but i really need to do that on follow-up action. It's the goal of the question.
I know we can implement that using precondition.

Antoine

permanent link
Antoine LELEU (5012728) | answered Feb 17 '14, 12:07 p.m.
 Thanks Ralp,

I found how display error message :
IReportInfo info = collector.createInfo("unable to save workitem", description);
    info.setSeverity(IProcessReport.ERROR);
    collector.addInfo(info);

But that don"t stop the save action. 
Do you know how can i stop the follow-up action in my plugin ?

Thanks,
Antoine

Comments
1
sam detweiler commented Feb 17 '14, 1:17 p.m.

you can stop a prior save with a followon/participant
the advisor stops it.. the participant doesn't get fired until AFTER the save


Antoine LELEU commented Feb 18 '14, 3:37 a.m.

 OK !


Thanks for this détails.

Antoine


Ralph Schoon commented Feb 18 '14, 4:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Hmm, I was mistaken then, I thought the workshop prevented the save if no build engine was found. I will have to have a look.


sam detweiler commented Feb 18 '14, 5:42 a.m.

hm..I meant to type cannot stop..  this is why the participant must issue another save. it cannot just change the data and let the operation continue.

Your answer


Register or 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.