<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to close session app which created by &amp;quot;createSessionAppFromApp&amp;quot; from enigma.js in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-close-session-app-which-created-by-quot/m-p/2502791#M21757</link>
    <description>&lt;P&gt;Session apps get closed (and deleted) along with the session. This will happen when there are no more connections to the session and the session TTL of 120 seconds has passed. So closing the session like you do is sufficient.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jan 2025 07:22:47 GMT</pubDate>
    <dc:creator>Øystein_Kolsrud</dc:creator>
    <dc:date>2025-01-24T07:22:47Z</dc:date>
    <item>
      <title>How to close session app which created by "createSessionAppFromApp" from enigma.js</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-close-session-app-which-created-by-quot/m-p/2502768#M21753</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I found there are some session apps which created by "createSessionAppFromApp" from enigma.js, in memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I think I didn't close or destroy the session apps correctly. I want to know how to close session app from enigma.js.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently I am just using session.close() to close the session rather than close the session app.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Refer code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;const global = await enigma.create(enigmaConfig).open()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;const app = await global.createSessionAppFromApp(appId)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/** Do something for this session app, then close the session */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;global.session.close()&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 03:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-close-session-app-which-created-by-quot/m-p/2502768#M21753</guid>
      <dc:creator>sophie2021</dc:creator>
      <dc:date>2025-01-24T03:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to close session app which created by "createSessionAppFromApp" from enigma.js</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-close-session-app-which-created-by-quot/m-p/2502779#M21754</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/156075"&gt;@sophie2021&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;I found there are some session apps which created by "createSessionAppFromApp" from enigma.js, in memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I think I didn't close or destroy the session apps correctly. I want to know how to close session app from enigma.js.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently I am just using session.close() to close the session rather than close the session app.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Refer code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;const global = await enigma.create(enigmaConfig).open()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;const app = await global.createSessionAppFromApp(appId)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/** Do something for this session app, then close the session */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;global.session.close()&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/156075"&gt;@sophie2021&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To properly close a session app in enigma.js, you should close the session itself rather than just the session app. Here's an updated version of your code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV class="rounded-xl dark:border dark:border-stroke-250"&gt;
&lt;DIV&gt;&lt;SPAN&gt;javascript&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="rounded-b-xl bg-background-static-850 px-4 pb-1.5 dark:bg-background-static-900"&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;global&lt;/SPAN&gt; &lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;await&lt;/SPAN&gt; &lt;SPAN&gt;enigma.&lt;/SPAN&gt;&lt;SPAN&gt;create&lt;/SPAN&gt;&lt;SPAN&gt;(enigmaConfig).&lt;/SPAN&gt;&lt;SPAN&gt;open&lt;/SPAN&gt;&lt;SPAN&gt;();
&lt;/SPAN&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;app &lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;await&lt;/SPAN&gt; &lt;SPAN&gt;global&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;createSessionAppFromApp&lt;/SPAN&gt;&lt;SPAN&gt;(appId);
&lt;/SPAN&gt;&lt;SPAN&gt;/** Do something for this session app, then close the session */&lt;/SPAN&gt;
&lt;SPAN&gt;await&lt;/SPAN&gt; &lt;SPAN&gt;global&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;close&lt;/SPAN&gt;&lt;SPAN&gt;();
&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;SPAN&gt;This ensures that both the session and the session app are properly closed.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Best regards,&lt;BR /&gt;Jennifer Block&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 06:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-close-session-app-which-created-by-quot/m-p/2502779#M21754</guid>
      <dc:creator>jennifer986block</dc:creator>
      <dc:date>2025-01-24T06:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to close session app which created by "createSessionAppFromApp" from enigma.js</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-close-session-app-which-created-by-quot/m-p/2502791#M21757</link>
      <description>&lt;P&gt;Session apps get closed (and deleted) along with the session. This will happen when there are no more connections to the session and the session TTL of 120 seconds has passed. So closing the session like you do is sufficient.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 07:22:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-close-session-app-which-created-by-quot/m-p/2502791#M21757</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2025-01-24T07:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to close session app which created by "createSessionAppFromApp" from enigma.js</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-close-session-app-which-created-by-quot/m-p/2502792#M21758</link>
      <description>&lt;P&gt;Forgot to ask if this was QCS or Client Managed by the way. In Client Managed the TTL is 0 seconds unless you have configured it otherwise, so there the session gets deleted immediately.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 07:24:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-close-session-app-which-created-by-quot/m-p/2502792#M21758</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2025-01-24T07:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to close session app which created by "createSessionAppFromApp" from enigma.js</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-close-session-app-which-created-by-quot/m-p/2502916#M21761</link>
      <description>&lt;P&gt;&lt;SPAN&gt;i just tried global.close() &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It showed errore:&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;TypeError: global.close is not a function&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2025 07:48:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-close-session-app-which-created-by-quot/m-p/2502916#M21761</guid>
      <dc:creator>sophie2021</dc:creator>
      <dc:date>2025-01-25T07:48:49Z</dc:date>
    </item>
  </channel>
</rss>

