Nouvelle publication

検索

Question
· Juil 4, 2024

Why do I have running jobs with no Process ID?

We have a business process that seems have extra jobs hanging around.  This is what we see in the Jobs tab:

Only the bottom one is actually associated with a process.  So what are those other ones?  There are no queues and I have no way of finding out why they're there.

Thanks.

1 Comment
Discussion (1)2
Connectez-vous ou inscrivez-vous pour continuer
Article
· Juil 4, 2024 2m de lecture

Explorando os Fundamentos do ObjectScript

Olá pessoal!

Recentemente iniciei meus estudos em ObjectScript e estive desenvolvendo alguns CRUDs básicos, apenas conhecendo a linguagem, sua sintaxe, seus métodos e funções. Durante esse processo, consegui desenvolver e implementar as minhas ideias utilizando principalmente as diversas funções nativas do ObjectScript .

Com isso, resolvi trazer o meu entendimento e uso de alguns métodos que foram essenciais e que me permitiram trabalhar a maioria das minhas ideias, de forma rápida e eficaz. São eles: $ORDER, $PIECE e $DATA

A função $ORDER retorna o número do próximo elemento de um array (ou anterior, dependendo da direção especificada) e, foi extremamente útil quando precisei trabalhar com o armazenamento de dados cadastrais dos meus sistemas, busca de elementos específicos e inserção de dados. Essencial para quando precisamos percorrer arrays onde podem ocorrer lacunas na sequência dos elementos subscritos.

Já com o $PIECE, conseguimos trabalhar com manipulação de strings, fazendo a divisão das mesmas com base em um delimitador. Com isso, conseguimos receber o retorno de um pedaço específico, ou então, fazer a substituição do mesmo. Utilizei muito para trabalhar com os meus dados armazenados, fazer listagens e trabalhar com formatação de textos e datas.

E por fim, o $DATA, uma função que nos permite fazer a validação de dados de uma variável. Imprescindível para quando precisei fazer alterações em variáveis globais com base em cópias locais alteradas, impedindo erros ao tentar trabalhar com variáveis inexistentes.

Estarei continuando a explorar novos conceitos e espero aprender muito mais sobre a linguagem para conseguir desenvolver sistemas ainda mais interessantes e complexos, caso alguém tenha alguma sugestão de estudo, prática, ou dica de assuntos e conceitos que também merecem uma atenção pela sua grande usabilidade, ficaria feliz em ouvir :)

Discussion (0)0
Connectez-vous ou inscrivez-vous pour continuer
Article
· Juil 4, 2024 1m de lecture

How to find your imported XSD file

Have you ever imported an XML schema from an XSD file? You might want to look at the original file again sometime later, but forgot where you put it.

Do not worry, that information is being kept as part of the import process.

The whole imported XSD schema is being kept in the ^EnsEDI.XML.Schema global. That global holds all the imported XSDs in your namespace. The first subscript is the name of the schema that you see in the portal.

 

To look for the source XSD file location, simply look at the following place:

^EnsEDI.XML.Schema(<schema name>,"src",1)

 

For example:

ZW ^EnsEDI.XML.Schema("PatMedData","src",1)

^EnsEDI.XML.Schema("PatMedData","src",1)="c:/users/kskubach/downloads/eq/Patxsd.txt"

If the name of the schema in the portal includes a prefix, make sure to include it as well:

ZW ^EnsEDI.XML.Schema("Myxsd.txt","src",1)

^EnsEDI.XML.Schema("Myxsd.txt","src",1)="c:/users/kskubach/downloads/Testxsd.txt"

 

Of course, if someone has since deleted this file or directory it is a different problem...😉

Discussion (0)0
Connectez-vous ou inscrivez-vous pour continuer
Question
· Juil 4, 2024

Convert 2024-07-04 13:21:16.477 to 20240704132116

How can I convert

From = 2024-07-04 13:21:16.477

To = 20240704132116

3 Comments
Discussion (3)2
Connectez-vous ou inscrivez-vous pour continuer
Question
· Juil 4, 2024

Recommended way to read ???? ?? ??? files

Hello,

First of all thanks for your time reading this question, and thank you for your help.

🎯 We would need to create an Ensemble HealthShare Operation to read files from a FTP / SFTP server.

We have coded:

Class Operaciones.FTP.ConsultaPDFv01r001 Extends Ens.BusinessOperation [ ProcedureBlock ]
{

Parameter ADAPTER = "EnsLib.FTP.InboundAdapter";

Method ConsultarDocumentoPDF(pRequest As Mensajes.Request.ConsultaPDFRequestv01r00, Output pResponse As Mensajes.Response.RecuperarDocumentoPDFv01r00) As %Library.Status
{
	set ftp = ##class(%Net.FtpSession).%New()
	
	set isConnected =  ftp.Connect(..Adapter.FTPServer, ..Adapter.Credentials.Username, ..Adapter.Credentials.Password, ..Adapter.FTPPort) {
	
	$$$LOGINFO($System.Status.GetErrorText(isConnected))
	$$$LOGINFO(isConnected)
	
	if isConnected {
		$$$LOGINFO("HOLA")
		do ftp.SetDirectory(..Adapter.FilePath)
		set stream=##class(%GlobalCharacterStream).%New()
		;set tsC = ftp.Retrieve(pRequest.nombreDocumento, .stream)
		;if 'tsC { $$$LOGERROR("Error al recuperar el documento") }
		if 'ftp.Retrieve(pRequest.nombreDocumento, .stream) { $$$LOGERROR("Error al recuperar el documento") }
		else{
			$$$LOGINFO(stream.Read())
		}
	}
	Quit $$$OK
}

XData MessageMap
{
<MapItems>
	<MapItem MessageType="Mensajes.Request.ConsultaPDFRequestv01r00">
	     <Method>ConsultarDocumentoPDF</Method>
	</MapItem>
</MapItems>
}

}

When we try this operation from the Web Portal, we always get the following result:

First loginfo outputs: "ERROR #00: (sin descripción de error) [no error description]"

Second loginfo shows: 0

 

We have verified that the IP and Port of the server are correct, but we do not understand why it does not connect.

We know that the code does not enter inside the if which checks if it isConnected

set isConnected =  ftp.Connect(..Adapter.FTPServer, ..Adapter.Credentials.Username, ..Adapter.Credentials.Password, ..Adapter.FTPPort) {

if isConnected {

 

How could we get what exact error is happening?

 
🔎 We have also read:

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic....

https://community.intersystems.com/post/how-does-enslibftp-use-netftpses...

https://community.intersystems.com/post/ftp-file-download-all-files-no-f...

https://community.intersystems.com/post/using-and-debugging-netsshsessio...

https://community.intersystems.com/post/how-download-files-ftp-server-lo...

https://community.intersystems.com/post/how-uploaddownload-image-files-f...

https://community.intersystems.com/post/how-get-files-ftp-server

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

 

🎯 How would you accomplish this task, to be able to read a file from a FTP / SFTP server in HealthShare 2020?

 

Thanks for your time, and thank your for your replies.

🐱‍💻🐱‍💻🐱‍💻
 

5 Comments
Discussion (5)3
Connectez-vous ou inscrivez-vous pour continuer