查找

Artigo
· Out. 30 2min de leitura

EnsLib.SQL.Snapshot not cleaned during purge messages when used in Response Message

Hi All,

First I want give a Shout Out to @Theo Stolker  and @Rupert Young. Because they helped me with the solution.

 When you're using the EnsLib.SQL.Snapshot as a Property in the Response Message to return Snapshot data (,e.g.: from Business Operation to Business Process,) the Snapshot data won't be cleaned with the Purge messages task/service.

Class ResponseMessage Extends Ens.Response

{

    Property SnapshotProp As EnsLib.SQL.Snapshot;

}

The data will be stuck in the global: ^Ens.AppData. You can find it with this query in System>Globals:  ^Ens.AppData("EnsLib.SQL.Snapshot",

The reference is recored in the class:  EnsLib.SQL.Snapshot you can query it with SQL: SELECT * FROM EnsLib_SQL.Snapshot ORDER BY ID asc

These data won't be deleted during the Purging task. So the Data will be growing over time. When you have this issue, you can clean all the data manually with the following method:

  • Clean Global: ^Ens.AppData:
    • Stop Production
    • Run on terminal(, be sure you're on the right NameSpace): do ##class(Ens.Adapter).ClearStaticAppData("EnsLib.SQL.Snapshot")
    • Start Production
  • Clean EnsLib_SQL.Snapshot :
    • Delete with SQL: TRUNCATE TABLE EnsLib_SQL.Snapshot

But this is not ideal, especially on the PRD environment.

Solution:

This issue only happens when you're returning data from BO to BP, or maybe from BP to BS. Because the idea is the same. 

One solution is not to use EnsLib_SQL.Snapshot as a property in the return message. But to map the data to another objectType (e.g.: JSON as String, other classTypes).

Another solution is to make the Purging task purge the Snapshot data with  %OnDelete method:

https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=GO...

So:

Class ResponseMessage Extends Ens.Response
{

    Property SnapshotProp As EnsLib.SQL.Snapshot;

   ClassMethod %OnDelete(oid As %ObjectIdentity) As %Status [ Private, ServerOnly = 1 ]
   {
      set id = $$$oidPrimary(oid)
      set obj = ..%OpenId(id)
    
      return ##class(EnsLib.SQL.Snapshot).%DeleteId(obj.SnapshotProp.%Id())
   }

}

Hope it wil help you as it's helped me!

PS: Related post: https://community.intersystems.com/post/setting-enslibsqlsnapshot-vs-ens...

1 novo comentário
Discussão (1)2
Entre ou crie uma conta para continuar
Anúncio
· Out. 30

Halloween no Global Masters - Inscreva-se antes de 3 de Novembro

Olá Comunidade!

No Global Masters, preparamos uma aventura de Halloween totalmente nova para você. 🎃

Assuma o papel de engenheiro líder na PumpkinOps e descubra o que está causando problemas no sistema.
Conclua as etapas de investigação, estabilize a versão e Ganhe até 120 pontos pelo seu trabalho.

Conclua todas as tarefas antes de 3 de novembro para receber 50 pontos de bônus!⚡️

👉 Clique aqui para iniciar a investigação.

Ainda não é membro do Global Masters? Cadastre-se agora usando suas credenciais de SSO da InterSystems (as mesmas credenciais que você usa no Data Center).
Saiba mais sobre o programa de gamificação do Global Masters para desenvolvedores aqui.

Discussão (0)1
Entre ou crie uma conta para continuar
Anúncio
· Out. 30

Consulte Bancos de Dados InterSystems IRIS com a API de banco de dados em Python (Python DB-API)

Olá Comunidade,

Você é um desenvolvedor Python? Se sim, você já pode começar a criar aplicativos com o InterSystems IRIS sem precisar aprender uma nova linguagem de programação! 

 

Use Python with InterSystems IRIS. Try the exercise.  

👨‍💻Experimente este exercício para começar rapidamente a usar a interface familiar DB-API do Python para se conectar a um banco de dados InterSystems IRIS e executar consultas SQL.

💬 Qual foi a sua experiência com o exercício? Conte-me nos comentários!

Discussão (0)1
Entre ou crie uma conta para continuar
Pergunta
· Out. 30

Limiting User Access: how to deny access to the Management Portal

Hello everyone! 👋

I have a question regarding roles and resources. 

To give you some context: I have a user who has been assigned only the role %HS_UsageDashboard_Access.This allows them to access the dashboards correctly (by giving the direct URL). Then,  if I try to access the Management Portal with this same user, I can log in with no access to any resources within it (as expected).

The point is that I would like to completely deny him access to the Management Portal, while allowing him to view only the dashboards, as expected from the %HS_UsageDashboard_Access role. I can give users access to resources, but can I also deny them in some way? Does anyone have any suggestions?

Thanks 🤗 

2 Comments
Discussão (2)2
Entre ou crie uma conta para continuar
Anúncio
· Out. 30

Halloween on Global Masters - join before November 3

Hi Community! 

On Global Masters, we’ve prepared a brand-new Halloween journey for you 🎃

Step into the role of a lead engineer at PumpkinOps and uncover what’s haunting the system.
Complete the investigation steps, stabilize the release, and earn up to 120 points for your work.

Finish all tasks before November 3 to receive 50 bonus points!⚡️

👉Click here to Start Investigation

Not a Global Masters member yet? Join now using your InterSystems SSO credentials (same credentials you use on DC). 
Read more about Global Masters gamification program for developers here.

Discussão (0)1
Entre ou crie uma conta para continuar