qlik-oss / enigma-go

Go library for consuming Qlik's Associative Engine.
MIT License
39 stars 12 forks source link

Possibility to handle pushed changes/closing of objects when not using ChangedChannel. #39

Closed DnlLrssn closed 5 years ago

DnlLrssn commented 5 years ago

Description

Engine can "push" changes to objects, e.g.

{"jsonrpc":"2.0","change":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],"suspend":[1]}

When this happens and we use change channels to subscribe to changes, the changes are triggered correctly. However with the introduction of #35 and the possibly to react on changes synchronously we do not currently have a way to catch the pushed changes and closing of objects.

A suggestion is to e.g. introduce a new channel for pushed changes similar to the SessionMessageChannel.

We will also need similar logic for closed objects pushed by engine.

Steps to Reproduce

There's many was to get a pushed change message, here is one easily reproducible:

  1. Connect a session to a sense app in e.g. Qlik Sense Server
  2. Trigger a reload externally (e.g. through QMC task)
  3. Wait until reload is finished and the enigma session should receive a push message.
Expected behavior

I expect a way to react on pushed changes when not using ChangedChannel.

Actual behavior

Currently doesn't exist.

Environment

Operating system
[x] Windows
[x] OSX
[x] Linux

Versions

wennmo commented 5 years ago

@DnlLrssn @gabbaxx This was resolved in #62. Are there any remaining tasks for this issue?

DnlLrssn commented 5 years ago

Resolved in #62