Stop execution participant operation in case of error, having more operation participant running one after another
![]() Hi all, as object, I need to be able to block the execution of an OpertationParticipant, in case of error, without going to the execution of the next. I try to explain myself better, I have a series of Operation participant, which carry out targeted checks, but in case one enters a condition that I have defined that is not good (type control over format and format not respected) use problem = collector. createProblemInfo (...) and then collector.addInfo (problem); but the execution is not blocked but passes to the next Operation participant, which I do not need to do, also because I would face unhandled errors because I took it for granted that I could stop the execution.
Small postilla, I noticed that even if there is text in the error message this is not displayed directly, (I'm using the RTC 6.0.5 version), but if I place myself with the cursor on the error on the screen, I see a popup with the error message.
P.S. How do you set the severity of the problem? I know that by default it has a value of 4, but if I wanted to increase it, do I have to go up or down? Thank you.
|
3 answers
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Mar 19 '18, 12:10 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Mar 19 '18, 12:11 p.m. Your assumption to be able to stop the other advisors or participants is incorrect so you can not stop their evaluation. You will have to deal with the outcome. E.g. one issue can cause other issues.
Comments
Grazie mille per la tua risposta, è come pensavo. Ma puoi darmi dei link che parlano di questa "comunicazione" tra i plugin perché non ho trovato nulla a riguardo, ma sicuramente ci provo male. Approfitta della disponibilità per chiederti un altro paio di cose: 1) I messaggi di errore che vengono visualizzati mostrano solo il riepilogo e non il testo che viene visualizzato se si posiziona il mouse sul riepilogo o si fa clic su di esso. È una funzionalità della versione 6.0.5? 2) Puoi spiegare come funziona l'impostazione della gravità del problema? Lasciami spiegare meglio di default ha valore 4 ma se volessi aumentarlo o diminuirlo ?? Grazie mille ancora per la risposta.
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
This is a forum that uses the English language. You don't want an answer in German or French or Japanese etc. either. So please use English.
You're right, I had prepared for the mistake.Thank you so much for your answer, arrived I thought. But you can give me some links that talk about this "communication" between the plugins because I have not found anything about it, but I definitely feel bad. Take advantage of the availability to ask yourself another couple of things: 1) Error messages that only look at the content and text that is displayed if you place the mouse on the summary or click on it. Is it a feature of version 6.0.5? 2) Can we choose the optimization of the severity of the problem? Let me explain better by default has value 4 but if I wanted to increase it or decrease it ?? Thank you so much again for the answer. I'm sorry, I answered correctly again. I remember remotely some discussion on this forum, where a user shared data. I can not point you anywhere. I think there would probably a lot of problems to overcome to do this kind of communication. E.g. how to know the operations are in the same context and who to communicate with whom? Usually you don't want this kind of design.
You can use packaging to share code. Otherwise I have no great idea.
Excuse me how can I share the code? Then I do not know if it's possible, but I ask my manager, however, basically I try to explain myself I have two custom advisors (CA) that control one format and the other if the format is correct ie NNN (ie are three numbers with two points in half) check syntaxically the format ie if depending on the type of release is written following other rules. Now if someone misses an incorrect format I give an error message but then he / she sees me the correct message but also another unhandled exception, because the next CA expects that the format is correct, so (as in this case) I would like to bypass the execution of the next CA, because it would go into an unmanaged error (deliberately not to replicate the code). I hope I explained myself better. Thank you. See the extensions workshop, where code is shared across projects. That is basically the mechanism you can use. You can have multiple extensions use the same code across projects.
Thank you very much, I immediately throw an eye: D
showing 5 of 9
show 4 more comments
|
![]() Hello, sorry for the delay, basically I'll explain. I would need to do some very specific Custom Advisors (CA), each one makes a certain control and in succession I have four that do very targeted and individual controls, so if a check is not right at the first CA I would need not to run the others , as I could go against unhandled error. I could handle them but I would have to replicate the code from one CA to another and we wanted to avoid it. Possible that there is no way to tell him not to run the rest of the CA if he already has an error in his stomach? Since it shows all the errors that it meets, it would be enough for me if you have at least one the other CAs have to be bypassed ..... You can not think of anything to help me? Thanks anyway.
|
![]()
Geoffrey Clemm (30.1k●3●30●35)
| answered Apr 01 '18, 12:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Based on simple testing with the built-in preconditions, all pre-conditions are executed in the order specified, whether or not any of them have failed. An argument in favor of executing them all is that the user is made aware of all of the ways in which their operation would have failed.
Comments Thanks Geoffrey Clemm, but I do not understand a thing, the Enhancement 456094 you created is waiting for processing? I mean, did you put my doubt on another side? Excuse the question, if you fool, but it is the first time that I disturb you for these things: D. In the meantime I take the opportunity to ask for info on the collector, that is, since the errors are listed in order of execution all together (unlike the version 5.0.2, which at first stopped) there is no way to check the contents of this Collector in way to set that if there is at least one element is not executed ???? Thanks :D I am pretty sure that there is no difference between 5.0.2 and later versions. I have worked with this all the time and I would likely have notice. You always get all the errors for an operation and not just the first. I am also pretty sure you don't have access to the results of the other operations before you. You can try to look into the data you get. I have never tried something like that.
Hello, we would miss that you have the magic: D, I with previous versions I meant before 5.0.2 that at the first exception showed the errors due to the precondition, but I'm probably wrong. I'm trying to analyze the collector object and I have a question, there is the addInfoProblem method, but I can not find anything to check for the presence or not of some problems in the collector. Because I had imagined that since it has it (showing them all means that from the first onwards something inside must have) I wanted to check the presence or not to constrain the subsequent executions, but I do not find anything that can help me, you have some idea? Thank you very much in advance and sorry for all the questions, but I would like to understand if somehow it is possible to manage this behavior. This mechanism is available since RTC beta 1 and has not changed for all I know.
Actually I'm having a lot of problems on the recovery of this information, I'm trying to recover "extreme" but then I wonder, the collector is common to all because it is passed to the signature of the run method, but at this point between one and the other must to be reachable the content of the collector, as he then shows them all not? Do I miss something? Thank you so much again for everything. |
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.