Please try to send 1.txt through the pipeline with contents like 123.
Are the hexdumps the same for that case?
- Log in to post comments
Please try to send 1.txt through the pipeline with contents like 123.
Are the hexdumps the same for that case?
Rename method there to move the file.
Awesome, thank you for that information!
Try setting Charset to Binary in your BO, and check that file is Binary in your source BH.
I'd try sending txt file through the pipeline and compare the results.
You may need to either use Selenium or extend production ZEN page.
The ZEN page is EnsPortal.ProductionConfig and host diagram is defined in:
<ownerDraw id="svgDiagram" onrender="zenPage.drawDiagram(zenThis);"/>
And drawn in these methods:
Please post it as a new question with expanded explanation. Code sample would help.
There is no such attribute in <Database> tag, unfortunately.
You can call code from %Installer via Invoke tag (more on that).
To change journaling programmatically execute:
/// Change database journaling state.
/// dbDir - database Directory (can be passed relative to the current working dir)
/// journal - 1 or 0. 1 enables journaling, 0 disables it.
/// zw ##class(util.Test).JournalDB("USER", 1)
ClassMethod JournalDB(dbDir As %String, journal As %Boolean = {$$$YES}) As %Status
{
quit:((journal<0) || (journal>3)) $$$ERROR($$$GeneralError, "Invalid journal value. 0 or 2 for No, 1 or 3 for Yes")
set:journal=$$$YES journal=3
set:journal=$$$NO journal=2
new $namespace
set $namespace = "%SYS"
set db=##Class(SYS.Database).%OpenId(dbDir)
set db.GlobalJournalState = journal
quit db.%Save()
}That said, any particular reason you want unjournaled databases?
Thank you, Danny!
You already have a value of SessionId, so concatenate the rest?
To get port and host call:
set sc=##class(%Studio.General).GetWebServerPort(.port, .server)
Do you catch exceptions?
If not try this:
Try {
Kill %objlasterror
Set conn = ##class(%Net.Remote.Gateway).%New() // No error here
Set tSC = conn.%Connect("127.0.0.1", "55000", "NETTEST") // No error here
Write:$$$ISERR(tSC) $System.Status.GetErrorText(tSC),!
ZWrite %objlasterror
Set api = ##class(writetofile.WriteFile).%New(conn) //Here comes the error
ZWrite %objlasterror
Set strFile = "d:\temp\example.txt"
Set strInput = "Hello world"
Set ret = api.FilePut(strFile,strInput)
Set tSC = conn.%Disconnect()
Write:$$$ISERR(tSC) $System.Status.GetErrorText(tSC)
} Catch ex {
ZWrite %objlasterror
Do ex.Log()
Write ex.DisplayString(),!
}%objlasterror can contain more error information. Also check application error log.
Are you on 32 or 64 bits? Check Cache with:
Write $system.Version.Is64Bits()
.Net library should be compiled with the same architecture.
Some ideas:
What other data do you need?
Also, please post your code as text.
First create the request and assign the property one by one?
Yes.
Thank you, Benjamin fixing 1 and 2 helped.
About 3, $$$YES and $$$NO are system-supplied macros with values 1 and 0 respectively.
The problem with HTML is creating templates. Users have LibreOffice or MS Word, so they can easily edit doc, docx, odt, rtf templates but not HTML.
Also HTML does not have pages, so printing is not as simple.
How did you create HTML templates?
Agree with you on placeholders - % example is very simplistic.
You can reference it as a normal property (which it essentially is).
If it's a BO, BS or simple BP:
set a = .."name_BO"
If it's a BPL process:
<trace value='process."name_BO"'/>
You need first to convert JSON into dynamic object and then create Ens.Request from that. Well, probably a subclass of Ens.Request as it can't hold any data.
You can access all settings of your BP by just calling them directly, in your case:
set a=process."Name_BO"
UPD. Let's continue this discussion in your separate question.
So you want to know the name of a current host from inside of it?
Business host has a %ConfigName property which you can access.
For example in BPL process you can trace the HostName like this:
<trace value="process.%ConfigName"/>
And here's the result:

In simple BP, BS and BO you can access current HostName with:
write ..%CinfigName
That said, why do you need to get the name of a current host from inside of it?
My bad,
do %SYSTEM.Process:Terminate(pid)
is invalid, only this form is correct:
do $SYSTEM.Process.Terminate(pid)
Fixed in original comment.
Solution from @Vitaliy Serdtsev is simpler and can be called from any namespace
do $SYSTEM.Process.Terminate()
Additionally user may not have access to %SYS namespace due to security reasons.
While working, this solution has a drawback of working only in %SYS namespace.
You need to use
set tSC=##class(EnsPortal.Utils).ItemSettings("Production.Name||Item.Name",.settings,.colNames)Where ProductionName is Production class. If ProductionName is not given, then the currently running or last run Production will be used. Item.Name is config name, not class. In your case you can call:
set tSC=##class(EnsPortal.Utils).ItemSettings("My.BP.AA",.settings,.colNames)To get the settings of My.BP.AA host.
I have not found the function (NameExists) in the documentation
Note, that the index "Name" is defined in this class. <Index>Exists is just an automatically generated method that returns a boolean (Passed index value exists). You can read more about autogenerated methods here.
Some examples with arduino:
Direct global update instead of SQL maybe?
Check the answer by @Dmitry Maslennikov, it seems to do precisely what you need.
Thank you, Daniel.
Also please check my pull-request.
Not a solution but as a workaround you can probably check the size of the generated PDF. It should probably be the same and fairly small (as it's an empty report).
Press F7 in Studio to compile all classes in a current project.
In terminal:
do $system.OBJ.CompileAll()
to compile all classes.
Everything seems fine.
I'd recommend checking with HTTP Debugging proxy what request actually gets sent. Article on that.
tl;dr plan:
Alternatively if you can run the BO locally you can modify the outbound adapter to send the request with Test=1 value and check what's sent.