go to post Ashok Kumar · Nov 27, 2023 Hello @Nimisha Joseph As per you're SQL implementation. It's actually straightforward and you took and store "Forename" and "Surname" in to context. haven't taken any SQL resultset object to loop. You can execute only embedded sql in the <sql> BPL element. So, If you want to execute the query you can assign the SQL object by using <assign> or you can use code block to write executable codes. I have added some sample code below for reference. Assign the SQL result set object to context variable while the result set process and result and do your implementation /// BPL Definition XData BPL [ XMLNamespace = "http://www.intersystems.com/bpl" ] { <process language='objectscript' request='Ens.Request' response='Ens.Response' height='2000' width='2000' > <context> <property name='Forename' type='%String' instantiate='0' > <parameters> <parameter name='MAXLEN' value='50' /> </parameters> </property> <property name='Surname' type='%String' instantiate='0' > <parameters> <parameter name='MAXLEN' value='50' /> </parameters> </property> <property name='ReportDiscipline' type='%String' instantiate='0' > <parameters> <parameter name='MAXLEN' value='50' /> </parameters> </property> <property name='tResult' type='%SQL.StatementResult' instantiate='0' /> </context> <sequence xend='200' yend='950' > <trace name='TEMP trace element' value='"In business process "_request.StringValue' xpos='200' ypos='250' /> <assign property="context.ReportDiscipline" value="request.StringValue" action="set" xpos='200' ypos='350' /> <trace value='"ReportDiscipline value: "_context.ReportDiscipline' xpos='200' ypos='450' /> <assign property="context.tResult" value="##Class(%SQL.Statement).%ExecDirect(,"select * from table")" action="set" xpos='200' ypos='550' /> <while condition='context.tResult.%Next()' xpos='200' ypos='650' xend='200' yend='450' > <assign property="context.surname" value="context.tResult.%Get("surname")" action="set" xpos='200' ypos='250' /> </while> <trace value='"SQLCODE: "_SQLCODE' xpos='200' ypos='750' /> <trace value='"returned value: "_context.Forename' xpos='200' ypos='850' /> </sequence> </process> } HTH.
go to post Ashok Kumar · Nov 21, 2023 Hello @Colin Brough Can you try is this approach is suitable. Create a Business Service with Ens.InboundAdapter or without adapter. Call your BPL process as usual interoperability production flow. Eventually Create your custom Task and invoke your Business service from the OnTask Inherited Method Class HL7Task.Test Extends %SYS.Task.Definition { Method OnTask() As %Status { Set status = $$$OK Try { #dim service As Ens.BusinessService Set status = ##class(Ens.Director).CreateBusinessService("HL7.Feed.TriggerService",.service) if $isobject(service) { do service.OnProcessInput(pInput,.pOutpt) } } Catch(ex) { Set status = ex.AsStatus() } return status } } Business service Class HL7.Feed.TriggerService Extends Ens.BusinessService { Parameter ADAPTER = "Ens.InboundAdapter"; Property TargetConfigName As Ens.DataType.ConfigName; Parameter SETTINGS = "TargetConfigName:Basic"; Method OnProcessInput(pInput As %RegisteredObject, Output pOutput As %RegisteredObject) As %Status { Do ..SendRequestSync(..TargetConfigName,pInput,.pOutput) Quit $$$OK } }
go to post Ashok Kumar · Nov 20, 2023 Hi @Prasanth Annamreddy If you're using Interoperability production to publish your FHIR resources. Then you may instantiate the object for the class HS.FHIRServer.Interop.Request to process the request and production expects this object as a input . Otherwise it will throw "ERROR <Ens>ErrRequestNotHandled: Request message not handled"
go to post Ashok Kumar · Nov 15, 2023 Maybe you're using literal properties for list operation. It causes the list error.
go to post Ashok Kumar · Nov 14, 2023 Hello @Luis Angel Pérez Ramos as of my understanding, We can send the it's as a query parameter or http request body if the design supports. Incase the external system protocol was designed to handled the authorization and some additional custom headers are must be a request header Then it should be part of the headers section otherwise I believe it may creates some issue with the request/response.
go to post Ashok Kumar · Nov 9, 2023 Have you verified? Did you get all the values whether the hl7 message is properly imported to the object after executing XMLImportSDAString for all the properties. do reqObj.XMLImportSDAString(xml.Read())
go to post Ashok Kumar · Nov 9, 2023 Hello @MARK PONGONIS Get/Post/Put any method will return status if error while executing otherwise return 1. The HttpResponse object property actually contains the response details such as status code, content length, content type, response etc... So, As you mentioned the code is "i http.HttpResponse.StatusCode" is used to get the status code of the response.
go to post Ashok Kumar · Nov 7, 2023 I believe the simulator/JWT.io uses Base64UrlEncode instead of Base64EncodeThe problem with Base64Encode is that it contains the characters + , / , and = ,. So Base64UrlEncode solves this by replacing + with - and / with _ .
go to post Ashok Kumar · Nov 7, 2023 Hello @Yone Moreno Try removing the = after $system.Encryption.Base64Encode(). You can also check the %OAuth2.JWT class to as well. do ##Class(%OAuth2.JWT).ObjectToJWT(.JOSE,body,,,.jwt)
go to post Ashok Kumar · Nov 3, 2023 Basically you should keepIntegrity enabled. Otherwise it will delete all the messages regardless of whether processed or not processed. Select "All types" in Type to purge. You can enable the " Open output file when task is running? " and provide the file location. Once the process is completed or Errored you can check the Ens_Util.Log to get some additional information. Can you try the above steps.
go to post Ashok Kumar · Nov 3, 2023 The object doesn't throw the <MAXSTRING> error. However variable do. If your serialization the JSON and stored into variable. If it's reaches the maximum string it will throw an error.
go to post Ashok Kumar · Nov 2, 2023 You need to select the BodiesToo option(whenever the message header details the body also deleted) to delete the messages from the database
go to post Ashok Kumar · Nov 2, 2023 Now the documentation are online based. You can access the documentation https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls Open documentation from iris lancher also connect to the https://docs.intersystems.com/iris20232/csp/docbook/DocBook.UI.Page.cls You can change the iris20232 to iris20222 to get the 2022.2 version documentation.
go to post Ashok Kumar · Oct 31, 2023 You can use %SetStatusCode from the %REST.Impl class definition. This class have additional methods available to set the response related stuffs like below do ##class(%REST.Impl).%SetStatusCode(..#HTTP401UNAUTHORIZED)
go to post Ashok Kumar · Oct 25, 2023 $this is actually return the current class name instead of object if you're using inside ClassMethod. On the other hand if you use $this (It actually holds the object) So, it returns object inside Method . Check the below sample code and output ClassMethod thistest() { write "$this inside ClassMethod: ",$this,! write "$this object check ClassMethod: ",$ISOBJECT($this),! set obj = ##class(User.NewClass1)..%New() do obj.thistest1() } Method thistest1() { write "$this Method: ",$this,! write "$this object check Method: ",$ISOBJECT($this),! } LEARNING>d ##class(User.NewClass1).thistest() $this inside ClassMethod: User.NewClass1 $this object check ClassMethod: 0 $this Method: 1@User.NewClass1 $this object check Method: 1 So. If you're trying to get the property value inside classmethod by using $this in $PROPERTY($THIS,propertyName) It throws <NO CURRENT OBJECT> error . so you should use object for $PROPERTY or use this retrieval $PROPERTY($THIS,propertyName) inside method.
go to post Ashok Kumar · Oct 24, 2023 The lock is belongs from different process(9908) and you're trying to terminate via different process(10376) not is not possible. You can verify and terminate the 9908 in process (System Operation>Process) if no longer required for prevent multiple locks set again and click remove all locks for process and remove it. Use $test special variable in your code to check the for success/failure lock. If lock is success it return 1 otherwise return 0 based on this result you can continue your logic flow. Always use incremental lock with timeout (ex: lock +^test:0) LEARNING>w $test 0 LEARNING>lock +^test:0 LEARNING>w $test 1 LEARNING>
go to post Ashok Kumar · Oct 24, 2023 Basically. The tcommiit will commit the current open transaction. Lock -^global (decremental lock ) is used to release the incremental lock( lock +^global) so everytime if you do incremental lock then you should decrement the lock) by using lock -^gbl syntax Argumentless lock is release all the locks in the process. So this is not highly recommend in code. And incremental locks are highly recommend for use.
go to post Ashok Kumar · Oct 24, 2023 I see you're locking the global +^IudexNqlInByte not unlocking. can you check the below tstart if staten["IUDX" { lock +^IudexNqlInByte(1):0 if $test{ set IudexNqlInByte(1,inc)=obj.%Id() lock -^IudexNqlInByte(1) } } else { lock +^ToshibaNQLIn(1):0 if $test { set ^ToshibaNQLIn(1,inc)=obj.%Id() lock -^ToshibaNQLIn(1) } } tcommit
go to post Ashok Kumar · Oct 23, 2023 Hello @Robert Steed Is the terminating process via SMP (System Operation>Process>SelectProcess Detail>Terminate) isn't working?