Please share your class structure
- Log in to post comments
Please share your class structure
##class(Ens.Rule.FunctionSet).Pad(inputString,LengthofYourString,0)
Eg: w ##class(Ens.Rule.FunctionSet).Pad(1,-4,0)
0001
Can the fix be published publically?
Yes both methods are running parallel and embedded SQL and object access are combined. My question is object oid of a row is stored inmemory. When you do some operation with embedded SQL the updated disk data is not updated automatically in the inmemory object. Means the open I'd should be explicitly reloaded to get the latest data from row.
The real question is whether I should kill the object oid then open it or don't kill the open Id object and just do the reload.
I too faced the same problem when my PC host name changed. After deleting cache.ids file it worked.
Well, I am looking to capture this for analysis purpose. I need not frame those exec statement manually.
Is it so. Before the SP is executed on target DB, the statement must be prepared and a exec statement is run in the below form. I am expecting this to capture.
exec pSPName '1', '2', '3'
I guess the output is written to i/o device. Do we need to change the i/o device to store in variable. May be we can use ^SPOOL global?
Fortunately It's known what to be sent.
Well my question has to scoped within object script. Trying to find the way. How about creating the request using %XML.Writer.
Expected Output for class 'Myclass'
Class User.Myclass
{
Property Username As %String;
Property Password As %String;
}
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<Myclass xmlns="http://www.xyz.com/test">
<Username>123</Username>
<Password>123</Password>
</GetSecurityToken>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Who is capturing those event. I am not.
The trace can be captured through outside app. I need the string to be populated in objectscript.
To make it more clear, I've a REST service which takes 'SOAP Request' in it's body and forward the request to SOAP endpoint. Now I have to call this service where I need to frame a SOAP envelope. I created the SOAP client and it can call only SOAP service(end point is a class with SOAP webmethod class). But in this case a SOAP envelop needs to be created to pass it to REST's POST.
You can try referring the multiple jar files as list to gateway.
Set AssemblyFileNameWithPath1="jar path 1"
Set AssemblyFileNameWithPath2="jar path 2"
Set gateway=##class(%Net.Remote.Gateway).%New()
Set classpath=##class(%ListOfDataTypes).%New()
Do classpath.Insert(AssemblyFileNameWithPath1)
Do classpath.Insert(AssemblyFileNameWithPath2)
Set status=gateway.%Connect(Host,Port,NameSpace,10,classpath)
Add the reference to cache provider for .net
using InterSystems.Data.CacheClient;
CacheDataReader dr;
using (CacheConnection con = new CacheConnection())
{
con.ConnectionString = "Server=" + Servername+ ";" + "Port=1972; Namespace=Namespace;" + "Password=" + Password + ";" + "User ID=" + UserName + ";";
CacheCommand cmd;
cmd = new CacheCommand("select * from table", con);
con.SetQueryRuntimeMode(InterSystems.Data.CacheTypes.QueryRuntimeMode.DISPLAY);
con.Open();
dr = cmd.ExecuteReader();
while (dr.Read()){ // do your stuff }
}
Something like when you are inside a class, just right click on 'get related associated project' and get the all the projects which contains that class.
Idea is to add extra menu option on right click.
Task Type in UI is nothing but the Class in which you are wrapping your code.
Class Task.Classname Extends %SYS.Task.Definition
{
Set tSC = ##class(Ens.Director).CreateBusinessService("service name",.tService)
If ($IsObject(tService)) {
Set input = ##class(service class??).%New()
Set input.Value = 22
Set tSC = tService.ProcessInput(input,.output)
}
}
ClassMethod Createtask() As %Status
{
Set tStatus = $$$OK
Try
{
Set tTaskName = "Task Name"
Set tTaskClass = "Task.Classname"
Set tTaskDesc = "Task Desc"
Set tSql="select ID from %SYS.Task where NameSpace = ? and TaskClass = ?"
Set tRS = ##class(%SQL.Statement).%ExecDirect(,tSql, $Namespace, tTaskClass)
If (tRS.%Next())
{
W "Updating Task: "_tTaskName
Set tTaskObj = ##class(%SYS.Task).%OpenId(tRS.ID)
}
Else
{
W "Creating Task: "_tTaskName
Set tTaskObj = ##class(%SYS.Task).%New()
}
Set tTaskObj.NameSpace = $Namespace
Set tTaskObj.Name = tTaskName
Set tTaskObj.TaskClass = tTaskClass
Set tTaskObj.Description = tTaskDesc
Set tTaskObj.RunAsUser = "_system"
//Run task daily at 2 am
Set tTaskObj.TimePeriod = tTaskObj.TimePeriodDisplayToLogical("Daily")
Set tTaskObj.TimePeriodEvery = 1 // Every day (7 days a week)
Set tTaskObj.DailyFrequency = tTaskObj.DailyFrequencyDisplayToLogical("Once") // Run once daily
Set tTaskObj.DailyStartTime = (60*60*2) // 2:00am
W "Saving task"
Set tStatus = tTaskObj.%Save()
$$$ThrowOnError(tStatus)
W "Saved task ID: "_tTaskObj.%Id()
Do $SYSTEM.Task.Resume(tTaskObj.%Id())
}
Catch ex {
Set tStatus = ex.AsStatus()
}
Quit tStatus
}
What's hstmt? You can call like this. SET sc= gc.%Prepare(pQuery)
My question is whether .net gateway service can be used when you have to call class library(dll) on Linux hosted ensemble instance.
I know it's ridiculous to expect .net framework on Linux(can be done with .net core, mono), but how you can overcome a situation where complex logic is built in c# class and a dll is given to you for quick implementation.
Language integrated query is a concept where you tend to query data like SQL. My question about the same. I've given a simple example of c# LINQ at the top.
Still investigation on the reference post.
Still investigation on the reference post.
Already raised WRC. No resolution so far.
Yes seems like this.
Able to browse: http://localhost:57772/api/atelier/
but not
http://xyxz.x.edu/instance/api/atelier/
It's enabled on the
server.
You can use Using the Caché Object Binding for .NET. Call the proxy class through console app/any class library.
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GBMP_proxy
api/atelier is not accessible.
IM Renderer Page
|
Cache for Windows (x86-64) 2017.1.1 (Build 111_0_17521U) Wed Jul 26 2017 13:08:05 EDT |
Yes