About "Work Item State Changed" event and event handler deve
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.
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
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.
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.