Any reason you want to do that?
- Log in to post comments
Any reason you want to do that?
Do you have IMAP available?
If not you can use DavMail to convert exchange to POP3 and that's easily consumable from InterSystems IRIS.
Open production class and remove them from XData.
Yes.
Check Export/Import method of Security.Roles class.
Please show a sample output.
Instead of
$zutil(96,39)
you can use
$$$MaxStringLength
for the same effect, but greater readability.
I completely agree with you.
Objects should be instantiated only when they are relevant.
Calling object methods where it's possible to call class methods makes code harder to read.
You should use Ensemble Alerts for that.
Redefine HTTP adapter like this:
Class Production.Adapter.HTTPOutboundAdapter Extends EnsLib.HTTP.OutboundAdapter
{
Method PostURL(pURL As %String, Output pHttpResponse As %Net.HttpResponse, pFormVarNames As %String, pData...) As %Status [ CodeMode = expression ]
{
..SendFormDataArray(.pHttpResponse, "POST", ..GetRequest(), .pFormVarNames, .pData, pURL)
}
ClassMethod GetRequest() As %Net.HttpRequest
{
set request = ##class(%Net.HttpRequest).%New()
set request.Timeout = 300 // Wait 300 seconds for response
quit request
}
}And use it instead of default adapter.
It sure is!
The pictures do not load.
JVM is probably out of memory. Try this.
1. Define Excel server at SMP > System > Configuration > Zen Report Excel Servers > Zen Report Excel Server, let's say at port 44444
2. Start it. Copy OS command. Should be something like:
C:\InterSystems\Ensemble\lib\ExcelExporter\runserver.bat -port 44444 -numthreads 5 -loglevel 3 -maxlogfilesize 32000 -logrotationcount 100 -numpingthreads 5 -pingport 44445 2>&1
3. Stop Excel server
4. Execute the command from 2 in OS terminal, but set JVM heap size. See how.
5. In your ZEN report add:
Parameter EXCELSERVER = 44444;
to use your excel server.
6. Recompile report and try to run it again.
try
\Cache\bin\
and execute there
csession cache
Also calling @Marc Mundt - he had a similar requirement.
You can set this parameter in JDBC connection.
Add to the Properties of the SQL Server gateway connection:
FetchSize=1000;
I think it could be a separate question:
How to export data returned from stored procedure.
It's better to use file streams.
Set stream = ##class(%Stream.FileCharacter).%New()
Set sc = stream.LinkToFile("E:\test\file.txt")
Do stream.Write("Some Text")
Set sc = stream.%Save()
To get queues list call:
Call EnsPortal.Queues_EnumerateQueues()
Or
SELECT * FROM EnsPortal.Queues_EnumerateQueues()
What do you want to do with that information over ODBC?
Wouldn't it produce strings like this:
stringA","stringB","stringC
leaving strings A and C unquoted?
Both Service and Operation presented in the article use EnsLib.PubSub.PubSubOperation to get subscribers.
Here's getting a list of emails by domain and topic:
/// Get email addresses by domain and topic.
Method determineEmails(domain As %String, topic As %String) As %List
{
set subRequest = ##class(EnsLib.PubSub.Request).%New()
set subRequest.Topic = topic
set subRequest.DomainName = domain
do ..SendRequestSync(..SubscriptionBO, subRequest, .subResponse,, "Get subscribers for domain: " _ domain _ ", topic: " _ topic)
set mails = ""
for i=1:1:subResponse.TargetList.Count() {
#dim target As EnsLib.PubSub.Target
set target = subResponse.TargetList.GetAt(i)
set mails = mails _ $lb(target.Address)
}
return mails
}The Pub/Sub operation only gives you a list of subscribers, you decide what to do with that.
I have a sample of Pub/Sub service/operation, I'll publish it in a few hours.
Do I have to define both a GET and POST for the same Route?
Yes.
Usually they have different logic so it makes more sense. What's your use case for GET and POST handlers to be the same?
As a direct solution you can do
write $zcvt("<CheckContractResponse><code>-1</code><message>ÐевеÑнÑй Ñип договоÑа</message></CheckContractResp>","I","UTF8")
<CheckContractResponse><code>-1</code><message>Неверный тип договора</message></CheckContractResp>
You need to add POST route:
Class Rest.UsuarioSvc Extends %CSP.REST
{
XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Routes>
<Route Url="/Oi/:xpto" Method="GET" Call="Oi"/>
<Route Url="/Oi/:xpto" Method="POST" Call="Oi"/>
</Routes>
}
ClassMethod Oi(xpto As %String) As %Status
{
Set tSC = $$$OK
If 'tSC Quit tSC
Set tProxy = ##class(%ZEN.proxyObject).%New()
Set tProxy.Oi = xpto _ "1234"
Set %response.ContentType = "application/json"
set %response.Status = 200
Do tProxy.%ToJSON()
Quit tSC
}
}
Please consider showing some code.
Check NoDefaultContentCharset property in request.
I'd try to avoid giving user an ability to enter arbitrary code.
1. Offer user a list of predefined operations ( >,<,=,<> or Equals,More, Not Equals,...)
2. Get input from user.
3. Check that input is actually one option on a list and not something else.
4. Perform the check using IF, for example.
ClassMethod main(a As %Integer, b As %Integer, operation As %String(VALUELIST="Equals,Not Equals") = "Equals") As %Boolean{ set operationList = $lb("Equals", "Not Equals")throw:'$lf(operationList, operation) ##class(%Exception.General).%New("<INVALID OPERATION>")if operation = "Equals" { set result = (a = b)} elseif operation = "Not Equals" { set result = (a '= b)} else { throw ##class(%Exception.General).%New("<INVALID OPERATION>")}quit result}