Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Server SynchronizeIncomiongAndWait operation on ExternalProxy blocks and times out.

Hi,

I'm using the Interop framework to bidirectionally sync RTC workitems to CA ServiceDesk. Users want the to see the CA ticket number come back immediately so instead of waiting for the delay of a sync to run we use a processAdvisor server side plugin to create the CA ticket ( which returns the ticket number immediately) and then create and setup necessary interop objects (externalState, externalProxy) as below.

My problem is that the external and lastSyncedState are not recorded in the syncRule/ExternalProxy when I save the sync rule with:
externalProxy = interopService().saveProxyWithTargetItem((IExternalProxy) externalProxy.getWorkingCopy(), newStateWorkItem);

The external and lastSynced state only appear to be written to the syncRule/ExternalProxy upon the first Incoming/?outGoing? sync .. if there's a way to do this without running a sync please advise ?!

As, unless all of item/'external/last synched state' states are recorded, users can submit intermediate changes to the RTC workitem, which causes a sync conflict upon the first sync.
This forces a user to open the sync rule, resolve the conflict and run and incoming sync.. all of which is unacceptable.

However when I try to run interopService.synchronizeOutgoingAndWait(oldStateWorkItem, xstate, syncRule);
to record the item/external/last synched states on the sync rule immediately... DOOM, the method doesn't return and the client hangs then timesout. .. N.B when I use the equivalent method from client side libraries (externally), this doesn't occur.

So I presently have to use asynchronous: interopService.synchronizeOutgoing which submits the request to the sync queue, and hope the user doesn't enter any data to the workitem until the background task processes the request ( usually around 20secs in our environment).

...                        
IExternalProxy externalProxy = InteropFactory.INSTANCE.createExternalProxy();                        externalProxy.setSyncRule(syncRule);                       
externalProxy = interopService().saveProxyWithUri(externalProxy, (String) newStateWorkItem.getValue(GSDIncidentIdentifierIAttributeID));                       
Map<String,String> externalStateAttributeHashMap =  new HashMap<String,String>();                        buildExternalStateMap(monitor, newStateWorkItem, propMap, externalStateAttributeHashMap);            IExternalState xstate = InteropFactory.INSTANCE.createExternalState();                        xstate.setState(externalStateAttributeHashMap);                       
xstate = interopService().saveExternalState(xstate);                       
externalProxy = interopService().saveProxyWithTargetItem((IExternalProxy) externalProxy.getWorkingCopy(), newStateWorkItem);
// interopService.synchronizeOutgoingAndWait(oldStateWorkItem, xstate, syncRule);                      interopService().synchronizeIncoming(externalProxy, null, /*syncedItemStateHandle*/null, /*syncRuleHandle*/syncRule);

...

Thanks, Paul









0 votes



One answer

Permanent link
As far as I know, only successful synch records the state. all the interop calls signal to start a synch.

when I did my synchronizer to SFDC, I used the External Repository Manager, it doesn't run synchronously.
you could still use the participant to create the CA ticket, update the workitem and let the synchronizer
do all the other work.

the synchronizer combines changes


0 votes

Comments

Thanks for commenting Sam, in the end I implemented the optional mergeProperty Interop Framework interface method, it's called on conflict of a property, and always chose to accept RTC's outgoing state.

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 7,495

Question asked: May 24 '14, 8:22 p.m.

Question was seen: 4,649 times

Last updated: Jun 28 '14, 4:01 p.m.

Confirmation Cancel Confirm