Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Data Services
Viewing all articles
Browse latest Browse all 58696

ManualSync using Data Modeling

$
0
0

Hi,

 

Currently I'm trying to use manual synchronization on a service generated through a Fiber Data Model but I can not get it to work.

 

Using the "selector" approach, the DataService receives all updates and not just the one it is subscribed to.

 

Trying to use "subtopics" does not work because the destination used for the service does not allow subtopics. Does anyone know how to enable manual synchronization when using Data Modeling? Or how to set the <allow-subtopics>true</allow-subtopics>-property for the destination?

 

The documentation on Data Modeling keeps refering to 'manual synchronisation' as an option, but I cannot get this to work properly.

 

The current code for the producer:

                         service.autoSyncEnabled = false;

                         service.autoCommit = false;

 

                        service.serviceControl.manualSync.producerDefaultHeaders = { group_id : _object.group_id };
                        service.createObject( _object );

                        service.serviceControl.commit();

 

 

 

And for the consumer:

                    service.autoSyncEnabled = false;

 

                    service.serviceControl.manualSync.consumerSubscriptions = new ArrayCollection( [ new SubscriptionInfo( null, "group_id = '" + _group_id + "'"  ) ] );
                    service.serviceControl.manualSync.consumerSubscribe();
                    service.serviceControl.addEventListener(MessageEvent.MESSAGE, handleMessage );

 

                    // get all available objects in the selected group, and keep the group up-to-date using manual synchronisation

                    service.getObjectsInGroup( _group_id );

 

Looking at the messages received through the handleMessage-method, messages for all 'objects' are being passed and not just for the ones mentioned in the selector-string.

 

Any help would be greatly appreciated!

 

Greetings,

Rogier


Viewing all articles
Browse latest Browse all 58696

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>