Usually you have to disable and enable classes for newly compiled code to be enabled, so perhaps you need to do the same for a DTL?
- Log in to post comments
Usually you have to disable and enable classes for newly compiled code to be enabled, so perhaps you need to do the same for a DTL?
Hi:
The file gets automatically archived using the archive path. It gets passed to a bp which then validates the filename and then copies the document to a working directory before it converts the document to a tiff file. It fails as it tries to copy the file to the working directory.
I do assume it is a fileshare availability/network issue but it is something we need contigency for to minimise manual intervention.
Have logged to WRC.
Mark
I have a call to an ITK sender.

The target Operation may fail.
it goes to a Wrapper object to send to an ITK

It is a sync request so want basically the business process to continue on where there is an error but to be retrying any failed messages again in an hours time. Trying any E=RS on the operations caused the BP to not accept any more messages in I think due to the suspension.
Thanks on further testing it looks like E=S was added to a business operation that called a sync request to another business operation as well as the one that was being called from the business Process. As the BPL sync call is an a-syncronous call with a sync block after simply adding this to the business operation that is called from BPL will do the job. Previously when this was tested the endpoint system was still down. This should be a more out of the box way to do the suspend queues.
Hi Eduard. Sorry my bad for not including that in my original snippet my full snippet is
#dim docs As Penn.EDT.XML.RelayedDocument
// docs now contains our results. Create a EDT document message for each
for i=1:1:docs.RelayedDocuments.Count() {
set LastChecked= ""
set LastChecked= docs.RelayedDocuments.GetAt(i).StatusLastChecked
if LastChecked="undefined" {$$$TRACE("Gotcha")}
$$$TRACE(LastChecked)
The LastChecked value trace prints out "undefined" as per the screenshot but if i say if Lastchecked="undefined" it doesn't work. Should see the trace Gotcha before it prints out the last checked date
.png)
It's still not right. Might just use $length as can't figure it out
set LastChecked= docs.RelayedDocuments.GetAt(1).StatusLastChecked
$$$TRACE("Date Added "_docs.RelayedDocuments.GetAt(1).DateAdded)
$$$TRACE("Date Last Checked "_docs.RelayedDocuments.GetAt(1).StatusLastChecked)
$$$TRACE(LastChecked)
$$$TRACE("LastChecked value is: '" _ LastChecked _ "', compare: " _ (LastChecked="undefined"))
if LastChecked= "" {$$$TRACE("blank")
}else{$$$TRACE("not blank " _$LENGTH(LastChecked) )}
if $L(LastChecked)<2 {$$$TRACE("Blank")}
.png)
.png)
.png)
might just use the length as at least it does work (length when blank was 1)
.png)
Thanks this looks great and when i try this again with code from scratch i will use this.
Ended up using the Length method as above but this sounds correct to know in the future which won't be long :)
Hi:
Your property undefined means you are using a variable not referenced in code. There is no reference to any tResponse it looks like in your code. Have you checked the case on this variable i.e. you declared it as tresponse instead of tResponse? Are you sure it is tResponse and not a pResponse?
Mark
New rows is does display null
.png)
The problem is old rows of type Rejected
.png)
This does not apply to old items of status "Sent"
Thanks for this the outcome was:
There was a field with nulls or 0's that must not have been in our development environment (guess). This could be seen by looking at the D Global for the table in the globals this value or viewing SQL in logical mode. The option would have been for us-
-Remove new row info add back in the old column and add the new one
-Accept the mistake and set value to null for the old data
We went with the later. The code that used to set this old field also seemed to not be in our dev or live environment nor this column that was overwritten being any use. Just a lesson in check your code when you're overwritting, check the class definition for a table especially the bit at the end with the words Value ect that explain the order of the data, look at the GlobalD for the class as well to see the data stored in a comma seperated value.
Neither option seem to work. We hope to within the next few months get up to date with our healthshare environment.
.png)
.png)
Nothing in the Production def left over
.png)
When try the set and write for either line of code when on default returns nothing
When i change it off default it works- but as this changes between environments want to be keeping this as a system defualt
Thanks the GetHostSettingValue() from your answer does work. I thought i tested both before replying previously.
Set archiveFilePath=##class(Ens.Director).GetHostSettingValue("ReadPDFFileService","ArchivePath",.status)w archiveFilePath
\\penn-data\archived_letters$\
I'm still confused:
I have it in a class method
.png)
I can't check it actually goes in the property as it's a classmethod and see no way to test it as a method to test the ..GPStatus
I get this now from my BO
.png)
.png)
Method GetGPStatus(pRequest As Penn.EDT.Messages.GetGPStatusRequest, Output pResponse As Penn.EDT.Messages.ODSGPStatus) As %Status
{
Set pResponse = ##class(Penn.EDT.Messages.ODSGPStatus).%New()
set reader = ##class(%XML.Reader).%New()
set httprequest = ##class(%Net.HttpRequest).%New()
set httprequest.SSLConfiguration = "test"
set httprequest.Https = 1
set httprequest.SSLCheckServerIdentity=0
Set status = reader.OpenURL("https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/Y00334?_…",,httprequest)
if $$$ISERR(status) quit status
do reader.Correlate("Status","Penn.EDT.Messages.ODSGPStatus")
$$$TRACE(..Status)
do reader.Next()
$$$TRACE(..Status)
//set pResponse.Status=obj
quit status
}
Doesn't like the .Next() for some reason.
If i try without the .next i get no value
.png)
Yup you're 100% spot on.
I got this to work once there then tried to sort out the error messages and it no longer correlates before realising that my firewall was starting to block the request.
I had a lot of errors, mainly down to to Message Definition. Will need to sort out the firewall issue
Final code:
Method GetGPStatus(pRequest As Penn.EDT.Messages.GetGPStatusRequest, Output pResponse As Penn.EDT.Messages.ODSGPStatus) As %Status
{
Set pResponse = ##class(Penn.EDT.Messages.ODSGPStatus).%New()
Set rdr = ##class(%XML.Reader).%New()
set httprequest = ##class(%Net.HttpRequest).%New()
set httprequest.SSLConfiguration = "test"
set httprequest.Https = 1
set httprequest.SSLCheckServerIdentity=0
Set tSC = rdr.OpenURL("https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/"_pRequest.GPCode_"?_format=xml",,httprequest) do rdr.Correlate("Status","Penn.EDT.Messages.ODSGPStatus")If 'rdr.Next(.gpxml,.tSC) || $$$ISERR(tSC) {If '$$$ISERR(tSC) Set tSC = $$$ERROR($$$EnsErrGeneral,"Failed to correlate GPStatus")
Quit tSC
}
set pResponse.Status=gpxml.Status
quit tSC
}
Class Penn.EDT.Messages.ODSGPStatus Extends (Ens.Response, %XML.Adaptor, )
{Property Status As %String(XMLNAME = "value", XMLPROJECTION = "attribute");Storage Default
{
<Data name="ODSGPStatusDefaultData">
<Subscript>"ODSGPStatus"</Subscript>
<Value name="1">
<Value>Status</Value>
</Value>
</Data>
<DefaultData>ODSGPStatusDefaultData</DefaultData>
<Type>%Library.CacheStorage</Type>
}}
Hi:
It is from a buisness operation Penn.EDT.BO.ElectronicLettersLookupExtends Ens.BusinessOperation
{Parameter ADAPTER = "EnsLib.SQL.OutboundAdapter";
I would have thought it would have suspended from the following
Set tSC = ..Adapter.ExecuteQuery(.rs, sql,args...)
if $$$ISERR(tSC) {
Do pResponse.Errors.Insert($System.Status.GetErrorText(tSC))
It turns out it wouldn't suspend because the code was quitting with a $$OK rather than the status.
It now does suspend the message but as there was no pResponse the operation still waits 15 seconds for timeout and then doesn't display in the production viewer with the purple/red dot if there was no suspending applied. Snippets that get called are below.
Method LookupDefault(pRequest As Penn.EDT.Messages.InputData, Output pResponse As Penn.EDT.Messages.PatientLookupResponse) As %Status
{
Quit ..DoLookup(.pResponse, sql,pRequest.NHSNumber, source)
}
Method DoLookup(Output pResponse As Penn.EDT.Messages.PatientLookupResponse, sql As %String, args...) As %Status
{
Set tSC = $$$OK
Set pResponse = ##class(Penn.EDT.Messages.PatientLookupResponse).%New()
Set tSC = ..Adapter.ExecuteQuery(.rs, sql,args...)
if $$$ISERR(tSC) {
Do pResponse.Errors.Insert($System.Status.GetErrorText(tSC))
} Else {
Do ..GetResults(rs,$G(args(2)),pResponse)
}
Quit tSC
}
}
I think the error needs to give a response to the calling object, how can i do this?
.png)
Hi:
Thanks, this doesn't seem to make any difference though
Hi:
I'm not sure if it is because we are on an older version of Healthshare. But Our version of the Ens.Util.Tasks.Purge does not contain the two fields for the send completion email? If this is the case and you have modified the Ens.Util.Tasks package you should not directly modify these classes, you should create a task that extends Ens.Util.Tasks.Purge.
As I suspect your Ens.Util.Tasks.Purge has been manually edited to include these properties we would need to see the code of the send method to see the error
Hi:
Thank you so much. I'm pretty much a complete beginner so just saying AttachStream took the full hour or so of trying to figure out how to implement it, so good learning exercise
Can you please check that this is the correct implementation? It works but I am aware I may have missed something that was obvious to it otherwise. I will mark as answer if it is correct. the variable file is the link to the attached file
Set tStream = ##class(%Stream.FileBinary).%New()
Set tStream.Filename = file
Set tSC = msg.AttachStream(tStream,##class(%File).GetFilename(pRequest.InputData.OriginalFilename))
If $$$ISERR(tSC) {....
Thank you. I think I had something along these lines and then due to /text html being returned went back on this.
This is developed on 2016.1 So i can't easily exlude the _id and another property from JSON. It's not may tidy but it works
Set Body = ##class(%ZEN.proxyObject).%New()
Set Body.Employee = pRequest.Employee
Set Body.UserName = pRequest.UserName
Set Body.ModuleName = pRequest.ModuleName
Set Body.CompletionDate = pRequest.CompletionDate
Set Body.CompletionDate = pRequest.CompletionDate
Set Body.Source= pRequest.Source
Looking at it new JSON when we upgrade very soon it could be a lot tidier.
The main stumbling block was all the responses i read use their own HTTP adapters. As soon as had class extending Ens.BusinessOperation, Ens.Util.JSON and using it's own adapter extending Enslib outbound like below it worked
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.ContentType = "application/json"
quit request
}
Hi Thanks I already resolved the core issues when using docker.
I don't know how to update files on docked instance as will get an access denied type error
.png)
For iris installed locally not through docker as it would be easier to create files it errors with the core issue as haven't seen steps how to solve this on a non docker instance.
*** Recovery started at Sun Jan 31 10:25:11 2021
Current default directory: c:\intersystems\iris\mgr
01/31/21-10:25:11:820 (16268) 2 [Generic.Event] Too many Cores (16) for InterSystems IRIS Community License.
Thanks, now I know there isn't an easy workaround I will just temporarily start my computer using 8 cores instead of 16 in startup when I plan to use it . I had played about with volumes but adding in as well the whole windows file system on it it was just too complex. Thanks
Hi:
I see in the digest from this week this link . It sounds to be like what you are trying to do.
Note this is built in IRIS not Ensemble 2018 so it may need tweaking in order to work in your build , i think it will still import with errors in the code. I don't see any headers that say Iris in it, if there is then change the word in the headers to cache.
I believe you may encounter issues with the code in the link stating .%ToJSON. I think this may have been introduced in IRIS or at least after our version which was 2017, there's a chance it is in 2018. You may need to use the method .%WriteJSONStreamFromObject from the %ZEN.Auxiliary.altJSONProvider or typing up manually the JSON string itself to avoid use of ZEN classes. If you look on my profile i asked a question recently of the .%WriteJSONStreamFromObject
My scenario has been:
I have a training work I did and it has File adapters for HL7. It needs to look at an IN and an OUT folder.
To do the work also access is required to put files into the IN folder and the OUT folder. Without rights it is not possible to create these folders or access it in the docker.
I'll have a look at extending the dockerfile to do this.
On reading I get why you may not want to modify a container at the runtime as it's just for getting the community version running on a non production environment (not even any sort of work environment just my own personal pc) making true use of Docker it doesn't particularly matter just as long as folders and files can be created when looking at stuff.
I'm not sure you can directly map from the JSON to response class in 2017. I think in the new Intersystems you can here do this direct mapping where you add it into your message class how it maps. It's not available in 2017 as far as I'm aware.
Id go for something like after you have the JSON Object
set objJson = ##class(%DynamicObject).%FromJSON(response)
Set pResponse = ##class(MyMsg.PartialJson).%New()
set pResponse.ext_customer_id=objJson .ext_customer_id
...
Issue is with particular build . To be fixed in 2020.3
Is Telnet enabled? Security-> Services %Service_Telnet ?
Thanks. Had actually been attempting without the / at the end mainly. Adding the %ALL just itself allows it to run.
Ah Going to close question. Did further debugging
Issue was in the call request. Didn't realise you couldn't use the context in here and actually you set the property in the request message class and then map your context on with the transformed data. Did no need to instantiate the context
I don't have a HL XML schema file? Think this was meant to create one