It's all about the answers!

Ask a question

Using Item Connector Framework


Ankur Sharma (151194) | asked Oct 21 '08, 8:59 a.m.
Hi

We are using Item connector framework for making connector for our defect tracking system. I have a few queries regarding Item connector framework.(https://jazz.net/wiki/bin/view/Main/ItemConnectorCreation) The following are the queires:

1. In Item connector client, there are two implementation choices : as a 'plain java application' or as an 'eclipse plug-in'. Which of these two implementations we should follow? Any idea how is it done in CQ connector ? Note that as per jazz tutorial it is recommended that we should go for 'java application' implementation.

2. While synchronizing from Jazz to External repository (NOT from External repository to jazz), the synchronization process can be started either explicitly or after a fixed interval of time. Is there any other other way to invoke synchronization process e.g. on the basis of event etc. (as this can done while synchronizing from external repository to Jazz).

3. We are not able to find javadoc/code for 'Jazz Plain Java Client libraries'. It would be helpful if we can have some link for it.

Regards
Ankur Sharma

47 answers



permanent link
megha mittal (15112615) | answered Jun 24 '11, 6:00 a.m.
Ok .So if it doesnt succeed then transition to 1-2-3-4 will happen smoothely ? I mean the exception occurred during transition of 1-4 will not lead to any problems further.

Also, we are saving approvals in our incoming code , using RTC workitem API (since item connector framework doesnt support approvals) . So out incoming code use framework to save other transitions but for approvals we use workitem API in between these transitions . We are not supporting any outgoing for approvals though but my doubt is that, is this can be another reason of getState () getting called out of way and creating problems for us.

I am doubting it because i think using API is like saving worktitem from RTC UI and i have noticed that when any save is done through RTC it first call getState and then decide upon whether to call updateState or not.

As per my understanding when doing interopManager.saveProxyWithState during incoming , it queue up all the task and doesnt call getState in between but only after it has processed all the incoming request.However in our case its getting called in between.

Thanks in advance.

I don't think there is a way to avoid this skipping of external states that can happen when the getState() method is implemented. I looked to see how the CQ synchronizer handles this. The same thing will happen; if a work item is in state 1 and a CQ record is in state 4, and outgoing sync is triggered on the work item, state 4 will be pulled in from CQ and applied to the work item. That may or may not succeed, depending on whether the 1 -> 4 transition is allowed in the work item workflow. Note that if it does succeed, because the CQ manager guards against data overwrites (according to https://jazz.net/wiki/bin/view/Main/ItemConnectorCreation#Incoming_data_overwrites), there won't be a problem when incoming sync runs, since it will be noticed that state 4 is already synced in, so it won't try to sync in states 2 and 3. Those states will be missing in the work item history, but both the CQ record and the work item will end up synchronized (in state 4).

I have a query related to behavior of getState method of external repository manager .As per link
https://jazz.net/wiki/bin/view/Main/ItemConnectorCreation#Introduction
this method is optional and used if we want to avoid conflict.So we have done implementation of this method in our External repository manager.
But this method is creating problem for us in some cases.

Like we have done a transition(Say 1) in external repository and it is pushed in RTC(say 1)
Now 3 more transitions(say 2-> 3-> 4) are done in external repository and since our incoming client code is on periodic basis it polls external repository and process these updates one by one .Meanwhile getState is getting called and it tries to compares the final state of external repository (i.e 4) with RTC current state and tries to move the state in RTC. (from 1 ->4).This results in loss of history ( 2, 3) or at times extra state transition on RTC since incoming is still doing processing .(say 1->4-> 2-> 3->4).
how to stop this extra transition done by getState (1->4).


Thanks
Megha

Now in continuation with above example ,in the absence of incoming supression ,incoming connector client will poll CMVC for updates (it will find modified 'summary' and 'remark')and will save them to external state. What will happen to these updates now?

Is this the situation when version number concept will be used to prevent these changes to be processed again?


The redundant incoming data should be a no-op; whenever a new state of an ExternalState item is created, it is compared with the previously-synchronized state, and if there are no differences, then no changes are applied to the connected Jazz item (e.g. work item). The CQ Connector doesn't suppress redundant updates, and that hasn't caused any problems.

Again, it would be easier to determine what's going on if you provide the details of any problems you're observing (error messages, debug traces, etc.) Feel free to email me that information directly.

permanent link
John Vasta (2.6k15) | answered Jun 24 '11, 9:11 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Ok .So if it doesnt succeed then transition to 1-2-3-4 will happen smoothely ? I mean the exception occurred during transition of 1-4 will not lead to any problems further.


If the 1-4 transition fails, then synchronization will just be in a failed state for that item, and generally require manual intervention in order to get it back in sync.


Also, we are saving approvals in our incoming code , using RTC workitem API (since item connector framework doesnt support approvals) . So out incoming code use framework to save other transitions but for approvals we use workitem API in between these transitions . We are not supporting any outgoing for approvals though but my doubt is that, is this can be another reason of getState () getting called out of way and creating problems for us.

I am doubting it because i think using API is like saving worktitem from RTC UI and i have noticed that when any save is done through RTC it first call getState and then decide upon whether to call updateState or not.


There is no direct interaction between saving a work item and synchronization. Periodically, a task runs to discover any work items that have been created or modified since the last time it ran, and trigger outgoing synchronization on them. So it doesn't matter how the work item was modified.


As per my understanding when doing interopManager.saveProxyWithState during incoming , it queue up all the task and doesnt call getState in between but only after it has processed all the incoming request.However in our case its getting called in between.


Both incoming and outgoing syncs for the same work item are added to the same queue, in the order that they occur, so it's possible that outgoing syncs are being added to the queue in between the incoming syncs that you are adding.

permanent link
megha mittal (15112615) | answered Aug 23 '11, 6:46 a.m.
i am trying to add comments to RTC in the form

"user==admin!FIELD!date==04 January 2007 11:02:08!FIELD!text==Just fix the bug.!NOTE_ENTRY!"

or

"user==admin!FIELD!date==1/8/2008 3:09:09 PM!FIELD!text==Just fix the bug.!NOTE_ENTRY!"

both gives me error "illegal notes format"

However
"user==admin!FIELD!text==xyz!NOTE_ENTRY!"
works fine for me.
Please tell me what is the date format expected here?

Thanks

permanent link
sam detweiler (12.5k6195201) | answered Aug 25 '11, 7:08 a.m.
i am trying to add comments to RTC in the form

"user==admin!FIELD!date==04 January 2007 11:02:08!FIELD!text==Just fix the bug.!NOTE_ENTRY!"

or

"user==admin!FIELD!date==1/8/2008 3:09:09 PM!FIELD!text==Just fix the bug.!NOTE_ENTRY!"

both gives me error "illegal notes format"

However
"user==admin!FIELD!text==xyz!NOTE_ENTRY!"
works fine for me.
Please tell me what is the date format expected here?

Thanks


prior to 3.01 the notes format did not support a date/time.. only user and text.

in 3.01 datetime support was added by two new parameters AND a NEW attribute name.

the Attribute is now CommentsWithDate
and the new format is

user==name
text==text
date==2011-08-25 08:02:03.000-0500
optional, defaults to 'yyyy-MM-dd HH:mm:ss.SSSZ', java.text.SimpleDateFormat string
format==yyyy-MM-dd HH:mm:ss.SSSZ

fields separated with !FIELD! and each note ended with !NOTE_ENTRY!
all notes strung together in one big string. you cannot just 'add one'

on output,(thru a remote repository handler), the format string WILL be supplied and COULD be different by note entry, as the note provider's source data is retained per note.

see workitem https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/153022

Sam

permanent link
megha mittal (15112615) | answered Oct 04 '11, 7:56 a.m.
I am using item connector framework for synchronization of CMVC defects /features.

When importing CMVC defects in RTC i noticed that remarks with same content but different date or user are not added to RTC. I am using remarks value transformer and have also overloaded equalProperty method in externalRepositorymanager.java ,both use SimpleNoteEntry.findMatchingtext method to compare remarks and i could see that comparison is done only on the basis of text .

Is it possible to edit this method to make comparison on the basis of both date and text?

permanent link
Lorelei Ngooi (1.5k22) | answered Oct 05 '11, 5:45 p.m.
JAZZ DEVELOPER
In 3.0.1, we introduced a new work item property to add to the sync rule, CommentsWithDate, that syncs the comment creation date as well as the text, https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/153022.

This thread is getting quite long and has miscellaneous topics. Please create a new thread for other requests.

permanent link
sam detweiler (12.5k6195201) | answered Oct 05 '11, 6:48 p.m.
I am using item connector framework for synchronization of CMVC defects /features.

When importing CMVC defects in RTC i noticed that remarks with same content but different date or user are not added to RTC. I am using remarks value transformer and have also overloaded equalProperty method in externalRepositorymanager.java ,both use SimpleNoteEntry.findMatchingtext method to compare remarks and i could see that comparison is done only on the basis of text .

Is it possible to edit this method to make comparison on the basis of both date and text?


when I added the prototype code for the date/time comparison in 153022, I did NOT add support for text content change. In RTC and our repository Manager, a comment is not editable.

you could change the source to the InteropWorkitemManager and SimpleNoteEntry (like I did) to ADD text comparison.. but you must replace the classes in the jar file as there is no plugin support that allows overriding this base function.

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.