go to post Eduard Lebedyuk · Feb 5 How about the following setup: In Business Service or first router BP set a global: ^data(mrn, timestamp) = messageId In your FIFO BP before sending to BO check: set nexttimestamp=$o(^data(mrn,""),1,nextmessageId) If nextmessageId equals current messageid that means there's no message in a pipeline for the same patient with earlier timestamp so we can send it out. Kill ^data(mrn, nexttimestamp) so next message can be processed If nextmessageId does not equal current messageid, compare timestamps: If timestamps are equal, send the message anyway and don't kill the subscript - we have more than one message with the same timestamp. If it happens often, value should be a list of ids. If nexttimestamp is earlier than timestamp, it means there are some other messages in a pipeline with the same MRN, sleep for 10 seconds and check again. Notes: You'll need to adjust this based on what you want to do if one of the messages errors before being deleted from the ^data global, options: Processing of messages for this patient effectively stops. Add an additional check in (4) - get other message header and check if it's in a final state (completed, errored, etc) - if so clear ^data subscript and continue. Add an additional check in (4) - if we waited more than X seconds, continue. This can be wrapped as Custom Functions and called from rules, BPs. Locks might help with ensuring consistency. The advantage here is that you can scale to any number of jobs immediately and since you enforce FIFO only at the end, most of the processing can be parallelized.
go to post Eduard Lebedyuk · Feb 5 There's no guarantee that BP with PoolSize=1 would process messages in enqueued order. That is only true for BOs, for BPs it's only true that message processing would start in the enqueued order. That might be (or might be not) a good enough guarantee for you depending on your use case. An approach I saw used to guarantee FIFO for BP is to add an intermediate BP with PoolSize=1 which sends a sync request to your target BP and waits for an answer. Can you elaborate on a Message key, please? Is it a random or a categorical division? Why three specifically and not some other number? What we were considering doing is increasing the pool size to 3 and programmatically creating a BPL on each thread that processes messages that would be directed to it, rather than having to create multiple BPLs into the production. What do you want to achieve with that change?
go to post Eduard Lebedyuk · Jan 31 You'll need to implement %OnValidateObject callback to do custom checking.
go to post Eduard Lebedyuk · Jan 24 %Library.RoutineMgr_StudioOpenDialog is a useful query! Originally I started writing something similar, but went into %Dictionary package instead, which of course created issues for me about System and Mapped classes, so I decided to go a different way (ended with what's presented in this article). With your approach I'll advice first building a list of classes to delete and then passing it to $SYSTEM.OBJ.Delete - it will be faster than deleting classes one by one. That said usually deletions are small in number (or at least in frequency) so speed does not really matter here.
go to post Eduard Lebedyuk · Jan 13 PropertyClass is for registered objects, not datatypes themselves.
go to post Eduard Lebedyuk · Jan 10 Please open a support case with WRC. If you can provide a sample class and query triggering this error it would be very helpful.
go to post Eduard Lebedyuk · Jan 10 Thank you, Ben! LoadDir returns loaded list with extensions (.cls) but Delete accepts only wildcards without extensions. If not for that minor detail, it would be a completely trivial two-liner. But accounting for this requires some interesting $LFS/$LTS wrangling in the middle.
go to post Eduard Lebedyuk · Jan 8 If the class to delete is persistent, include the 'e' flag or '/deleteextent' qualifier to delete the extent data and extent metadata.
go to post Eduard Lebedyuk · Dec 22, 2024 Hello, @Enrico Parisi!CSP On in Virtual Hosts is not supported by Web Gateway means that Web Gateway does no request disambiguation based on a Virtual Host and will process any request passed by Apache. However, Apache does Virtual Hosts request validation and won't pass a request to a Web Gateway if there's no corresponding CSP On directive.
go to post Eduard Lebedyuk · Dec 11, 2024 1 outputs but does not send the request, so just call Send with 1 first, then with 2 to get both request and response.
go to post Eduard Lebedyuk · Nov 13, 2024 I don't think you'll get much from parallelization with * in SELECT. Calling @Benjamin De Boe
go to post Eduard Lebedyuk · Nov 11, 2024 Quick question about the port. Is it the standard port the IRIS instance is running on? Yes, 1972 is a default Super Server port. I do not need an external language server connection on the host? External language servers talk to Super Server, so in a case of IRIS to IRIS we can just talk to Super Server directly.
go to post Eduard Lebedyuk · Nov 8, 2024 Convert xml to FHIR object: Set payload=##class(HS.FHIR.DTL.vR4.Model.Resource.Organization).FromXML(FHIRxmlStream)