Skip to Content
0
Former Member
Apr 21, 2008 at 03:33 PM

What i advice me? (Dependency syncbo)

10 Views

Hi experts, i have an application in MI 7.0 with various syncbo...

I have syncbo ZSBOE001 and syncbo ZSBOE002.

I write 'hi' from device in syncbo ZSBOE001, i sync, write in the table 'hi' and write in the table of syncbo ZSBOE002...

When return in the device, the new data that should be in ZSBOE002 not appear... I need do two sync... I understand why, but, how can avoid it? If i do two sync, it take long time.

Thanks,

PD: i intent:

Vector s = new Vector();
s.addElement("ZSBOE001");				
sincronizar(s, SyncBoDeltaRequestType.DIRECT_REQUEST);
s = new Vector();
s.addElement("ZSBOE002");
sincronizar(s, SyncBoDeltaRequestType.REQUEST);


	private void sincronizar (Vector syncbos, SyncBoDeltaRequestType tipo) {				
		SyncBoDescriptorFacade descriptorFacade = SmartSyncRuntime.getInstance().getSyncBoDescriptorFacade();
		
		if (syncbos.contains("ZSBOE001")) {	
			SyncBoDescriptor syncBoDescriptorE1 = descriptorFacade.getSyncBoDescriptor("ZSBOE001");
			SmartSyncRuntime rE1 = SmartSyncRuntime.getInstance();
			rE1.getSyncBoDeltaRequestFacade(VisibilityType.USER_SHARED).getSyncBoDeltaRequest(syncBoDescriptorE1).setProcessing(tipo);
		}
		else {
			SyncBoDescriptor syncBoDescriptorE1 = descriptorFacade.getSyncBoDescriptor("ZSBOE001");
			SmartSyncRuntime rE1 = SmartSyncRuntime.getInstance();
			rE1.getSyncBoDeltaRequestFacade(VisibilityType.USER_SHARED).getSyncBoDeltaRequest(syncBoDescriptorE1).setProcessing(SyncBoDeltaRequestType.NO_REQUEST);	
		}
		
		if (syncbos.contains("ZSBOE002")) {		
			SyncBoDescriptor syncBoDescriptorE2 = descriptorFacade.getSyncBoDescriptor("ZSBOE002");
			SmartSyncRuntime rE2 = SmartSyncRuntime.getInstance();
			rE2.getSyncBoDeltaRequestFacade(VisibilityType.USER_SHARED).getSyncBoDeltaRequest(syncBoDescriptorE2).setProcessing(tipo);
		}
		else {
			SyncBoDescriptor syncBoDescriptorE2 = descriptorFacade.getSyncBoDescriptor("ZSBOE002");
			SmartSyncRuntime rE2 = SmartSyncRuntime.getInstance();
			rE2.getSyncBoDeltaRequestFacade(VisibilityType.USER_SHARED).getSyncBoDeltaRequest(syncBoDescriptorE2).setProcessing(SyncBoDeltaRequestType.NO_REQUEST);		
		}			
			
		SyncManager syncManager = SyncManager.getInstance();

			syncManager = SyncManager.getInstance();

		syncManager.synchronizeWithBackend();
	}

But the sync continue in synchronous mode... and i can´t do nothing with the device.

Edited by: Victor Capi on Apr 21, 2008 5:34 PM