I'm developing a tool which is getting the list of widgets of Wookie via REST API. When selecting one widget, it creates an instance of the widget (or gets the instance), downloads flatpack of this widget, injects some files, redeploys the widget to wookie and then shows the widget in an iframe (using the instance created/gotten).
When using 2 or more different Widgets (e.g. Widget A, B and C), the API always returns me the correct instance values and always shows the correct widget in the iframe.
But the flatpack function has some issues when doing the following steps:
1) loading Widget A, it returns the flatpack of Widget A (instance A was just created).
2) loading Widget B, it returns the flatpack of Widget B (instance B was just created).
3.1) loading Widget A, it will return the flatpack of Widget B (instance B, which was last created).
3.2) loading Widget C (any other), it returns the flatpack of Widget C (instance C, which was just created)
All in all: when requesting the flatpack of a widget with a newly created instance, I get the correct flatpack. But when requesting another widget where the instance already has been created, it returns the flatpack of the widget with the latest created instance.
I've tried different parameters when using the flatpack API - just the instance id (the same I use for the iframe output), or all parameters I use for getting/creating the instance. There shareddatakey+userid+api key are always the same and the widget id is always the one of the requested widget.
I'm using the latest trunk code - checked out and recompiled just some minutes ago.