It's all about the answers!

Ask a question

About "Work Item State Changed" event and event handler deve


Jose Miguel Ordax Cassa (2.4k4126100) | asked Nov 19 '09, 5:53 p.m.
Hi,I have several questions about adding an event handler to this
specific event:

1.- Is it fired when I change the state in the combo without saving? Or
does it require to save the work item?

2.- Is there any Wiki Page like this:
https://jazz.net/wiki/bin/view/Main/PreconditionFollowupCreation but
about developing an Event Handler?

3.- Is there the possibility to develop an event handler for both sides:
client and server?

4.- Is there any JavaDoc about the API? For example, where or how do I
receive the reference to the work item or the state changed?

5.- Which could be the main differences between developing a "Work Item
State Changed" event handler and a Follow-up action for Work Item Save
Action (of course the follow-up action should check if the state has
changed)?

Thanks in advance,

Chemi.

One answer



permanent link
Robin Bobbitt (59679) | answered Oct 27 '11, 11:50 a.m.
I asked development question #5 and received back the following:

The key difference between the two technologies is that follow-up actions are called inside the same transaction as the main operation (e.g. the workitem save) and event handlers are called after the fact, outside the transaction. If a follow-up action fails for some reason, it will cause the entire transaction to roll back. This would prevent the operation itself from happening. If an event handler fails for some reason, the operation itself has already occurred so the event handler will just log an error.

So the question to ask yourself is whether or not your follow-up action is really a key integral part of the operation that *must* happen in order for the operation to proceed.

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.