Is there a way to get the calling method name ?
If a methodB() is invoked in MethodA() ;
In MethodB() , I would like to print the calling method name i.e., MethodA()
- Log in to post comments
Is there a way to get the calling method name ?
If a methodB() is invoked in MethodA() ;
In MethodB() , I would like to print the calling method name i.e., MethodA()
Thank you
Thank you
Thanks , it worked.
Status OK
and the cnt as empty (I am expecting the count)
-------------------------------
Set resultset = ##class(%ResultSet).%New("%DynamicQuery:SQL")
set sql = "SELECT COUNT(*) AS CNT FROM "_tableName_" WHERE "_fieldName_">='"_fromDate_"' AND "_fieldName_"<='"_currentDate_"'"
SET SC = resultset.Prepare(sql)
$$$LOGSTATUS(SC)
SET SC = resultset.Execute(sql)
$$$LOGSTATUS(SC)
if (resultset.GetData(1)>0)
$$$TRACE("cnt="_resultset.GetData(1))
-------------------------------
set sql = "SELECT COUNT(*) FROM "_tableName_" WHERE "_fieldName_">='"_fromDate_"' AND "_fieldName_"<='"_currentDate_"'"
SET SC = resultset.Prepare(sql)
SET SC = resultset.Execute(sql)
Set recordsDeleted = resultset.GetData(1)
$$$TRACE("recordsDeleted="_recordsDeleted)
Tried this , its not displaying the count ;
Thank you Ashok Kumar
Thank you , I will try these.
Hi Eduard,
I have a scheduler task and associated class that works.
Class Sample.Util.CreateTask Extends (%SYS.Task.Definition, %Persistent)
{
Parameter PROPERTYVALIDATION = 1;
Parameter TaskName = "Sample.Util.CreateTask";
Method OnTask() As %Status
{
// Perform the logic
}
}
Is there a way to Enable or Disable the abbove task "CreateTask()" from an external function/Method/class ?
Thank you Padmaja.
Many thanks , it worked
I tried using "w" also "wt" - no luck.
Below is the version that I am using
IRIS for UNIX (Red Hat Enterprise Linux 7 for x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:13:58 EDT [HealthConnect:3.5.0] [HealthConnect:3.5.0]
Thank you , I will try
My target is an .xsd
which I read it from Target class - EnsLib.EDI.XML.Document
Thank You.
Thank you.
I have tried this but it is not giving current time , an hour back it displays.
Thank you .This Worked for me.
DATEDIFF('s',inputDt,NOW())
Thank You.It worked
It worked :
set status = pRequest.XMLExportToStream(.XmlStream)
Do httpRequest.EntityBody.CopyFrom(XmlStream)
Do XmlStream.Write("<?xml version=""1.0"" encoding=""UTF-8""?><getURL><Url1>"_pRequest.getURL_"</Url1></getURL>")
This is removing CDATA from the xml.
Class TEST.pRequest Extends (%Persistent, %XML.Adaptor)
{
Property getURL As %String(MAXLEN = 10000000);
}
==================================
Class TEST.Operation.UrlOP Extends Ens.BusinessOperation
{
Parameter ADAPTER = "EnsLib.HTTP.OutboundAdapter";
Parameter INVOCATION = "Queue";
Method UrlApi(pRequest As TEST.pRequest, Output pResponse As TEST.pResponse) As %Status
{
Set httpRequest= ##class(%Net.HttpRequest).%New()
Set httpRequest.Server = ..Adapter.HTTPServer
Set httpRequest.Location = ..Adapter.URL
Set httpRequest.SSLConfiguration = ..Adapter.SSLConfig
Set httpRequest.SSLCheckServerIdentity = 0
Set httpRequest.Https = $$$YES
Set httpRequest.ContentType = "application/xml"
Set XmlStream = ##class(%Stream.GlobalCharacter).%New()
Do XmlStream.Write("<?xml version=""1.0"" encoding=""UTF-8""?><getURL><Url1>"_pRequest.getURL_"</Url1></getURL>")
//instead of above lines of code I would like to send pRequest into a stream
Do httpRequest.EntityBody.CopyFrom(XmlStream)
Set sc = httpRequest.Post("", 2)
}
QUIT $$$OK
XData MessageMap
{
<MapItems>
<MapItem MessageType="TEST.pRequest">
<Method>UrlApi</Method>
</MapItem>
</MapItems>
}
}
=====================================
Hi ,
Did you get a solution for erasinng <![CDATA[]]>?
I am having similar issue.
What if I need output in format - yyyymmddhhmmss
Thank you.
I recreated the Router and then worked as expected.
Many Thanks , its working
This is how I am doing :
---------
Class PKG.ObservationWrapper Extends %Persistent
{
Property bundleReq As HS.FHIR.DTL.vR4.Model.Resource.Bundle;
}
-------
Set wrapperBundleObj = ##class(PKG.ObservationWrapper).%New()
Set wrapperBundleObj.bundleReq = ##class(HS.FHIR.DTL.vR4.Model.Resource.Bundle).FromJSON(reqStream,"vR4")
Set tSC = BusinessService.SendRequestSync("SAMPLE_ROUTER", wrapperBundleObj.bundleReq)
expection :
ERROR <Ens>ErrException: <METHOD DOES NOT EXIST>zNewRequestMessage+4^Ens.MessageHeader.1 *%GetSwizzleObject,HS.FHIR.DTL.vR4.Model.Resource.Bundle -- logged as '-' number - @''
=======================================
I have similar requirement ; I would like to send bundle object to a router and then
perform a DTL with in the routing rule ( this BundleObject as a souce to my DTL).
during this process , I get below expection
reqStream = json content in a stream
Set BundleObject=##class(HS.FHIR.DTL.vR4.Model.Resource.Bundle).FromJSON(reqStream,"vR4")
Set tSC = BusinessService.SendRequestSync("SAMPLE_ROUTER", BundleObj)
expection :
ERROR <Ens>ErrException: <METHOD DOES NOT EXIST>zNewRequestMessage+4^Ens.MessageHeader.1 *%GetSwizzleObject,HS.FHIR.DTL.vR4.Model.Resource.Bundle -- logged as '-' number - @''
Hi All ,
It is solved :
Using this earlier :
d ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(pTarget.EntityBody,pRequest,,,1,"aelqtw")
using the below solved the issue :
d ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(pTarget.EntityBody,pRequest,,,1,"aeltw")