go to post Pietro Di Leo · Sep 12, 2023 Hi Pravin, You can use the syntax ./folderName in the files to include camp from the Search panel. Example This is my workspace I have 3 folders: 2 on a remote server and one in local. If I would like to restrict the research only to a remote folder I can type: ./npri_server_fhir:OMR As shown in the following picture: Make sure you have followed the procedure outlined at this page (InterSystems ObjectScript extension for VS Code), under Enable proposed APIs, to enable the search across all folders.
go to post Pietro Di Leo · Sep 12, 2023 Thank you Alex, how can I modify the OnFailureTimeout method for my purpose? I can find only a little documentation
go to post Pietro Di Leo · Sep 12, 2023 Thank you Luis, this was useful. However, I've encountered two issues while adapting the code you provided to my specific situation: if ..RetryCount = 1 { ; Find the production #dim p As Ens.Config.Production Set p = ##class(Ens.Config.Production).%OpenId("ProductionName") if '$isObject(p) { $$$LOGERROR("Production not found") quit } #dim item As Ens.Config.Item #dim sett As Ens.Config.Setting ; Loop over all the elements of the production for i=1:1:p.Items.Count() { s item=p.Items.GetAt(i) ; Find the desired business component if (item.Name="Component1Name" ||(item.Name="Component2Name")) { $$$LOGINFO(item.Name_" found") ; Explore settings for s=1:1:item.Settings.Count() { set sett=item.Settings.GetAt(s) ; Search for the FailureTimeout if (sett.Name="FailureTimeout"){ $$$LOGINFO(sett.Name_" found") ; Change the valure of the FailureTimeout based on the Severity If Severity = "high" { set sett.Value = -1 } Else { set sett.Value = 30 } } } } } Set sc = p.%Save() If $$$ISERR(sc) { $$$LOGERROR($System.Status.GetErrorText(sc)) quit } } With this code, I can adjust the FailureTimeout value based on the Severity parameter, and the updated value is correctly shown in the Production settings. Nevertheless, there are a couple of issues: This functionality only applies to modified settings, as it doesn't affect settings with default values, which are not included in the loop (set sett=item.Settings.GetAt(s)). Consequently, it's necessary to modify the settings at least once to ensure they are processed within the loop. While the FailureTimeout value gets updated, the sending procedure uses this updated value for the subsequent message, not the current one. As a consequence, the current message continues to operate with the outdated FailureTimeout value, causing the sending (and re-sending) procedure to deviate from the desired timeouts.
go to post Pietro Di Leo · Sep 7, 2023 Thank you! Congratulations to the other authors for their interesting questions, and to the rest of the community members for their responses!
go to post Pietro Di Leo · Sep 6, 2023 Hi Rich, sorry for the late response but I've worked on other projects for some times. I believe the issue with my code lies in the fact that the POST request was sent via a %Net.HttpRequest object: // Send an HTTP POST request Set messageStatus = httpRequest.Post(operation) rather than using directly the adapter: set tsc = ..Adapter.PostURL(URL,.tResponse,,InputStream) so the Timeout property of the %Net.HttpRequest object wasn't affected by the change on Response Timeout. I solved this issue with a little help of @Menno Voerman's suggestion: Set tHttpRequest.WriteTimeout = ..Adapter.WriteTimeout Set tHttpRequest.Timeout = ..Adapter.ResponseTimeout Set tHttpRequest.OpenTimeout = ..Adapter.ConnectTimeout In this way is possible to modify the response timeout dinamically too. I'm not sure if switching to the Adapter.PostURL method is a better choice compared to using httpRequest.Post. For now, I'm using the latter to minimize changes in my code.
go to post Pietro Di Leo · Aug 23, 2023 To conclude this discussion, I've summarized the solutions that have been suggested: For Visual Studio Code (VSC) Users with IRIS 2020.1.1 or IRIS 2021.1.2: Users that have IRIS 2020.1.1 or IRIS 2021.1.2 and that are able to install external extensions, might find useful the Web Terminal extension for VSC. This extension enables to launch a web-based terminal directly from VSC. For VSC Users with IRIS 2023.2: As suggested by @John Murray in a previous response, users of IRIS 2023.2 can take advantage of the new "WebSocket Terminal" feature included in the latest version of the VSC extensions and they don’t need for additional workarounds. For VSC Users with Docker-based IRIS: Those working with IRIS environments within Docker and using VSC can start a terminal session directly within the Docker environment, as suggested by @Evgeny Shvarov. Additionally, I've come across a few more solutions: For VSC users with IRIS Versions Prior to 2023.2 working on their local machine: In this case it’s possible to set up a dedicated IRIS terminal within VSC: Open the settings.json file. Add the following code under "terminal.integrated.profiles.windows": "IRIS Terminal": { "path": [ "C:\\InterSystems\\IRISHealth\\bin\\irissession.exe" ], "args": ["IRISHEALTH"], "icon": "terminal-cmd" } Note: Select the right path of irissession.exe. c. Navigate to: Terminal > New Terminal > Launch Profile… > IRIS Terminal. For VSC Users Coding on IRIS based on a remote server using an SSH connection: For those who code on a remote server (e.g., a company server) accessible via SSH connection (e.g., using Putty) it is possible to use the Remote - SSH VSC extension to connect directly to the server. In order to do so: Install the Remote - SSH: Editing Configuration Files extension on VSC; Click on the “Remote Explorer” icon in the sidebar; Select “Open Configuration File” to open the “ssh_config” file. Insert the following code into the configuration file: Host my-putty-connection HostName < IP address or server name > User < username > IdentityFile < private key path on your local machine > Port < port > Save the file. After a few seconds the new connection should appear in the Remote Explorer panel; Click “Connect in New Window…” In the new window, navigato to: Terminal > New Terminal. You’re now connected to the remote machine and can use its IRIS terminal within VSC.
go to post Pietro Di Leo · Aug 11, 2023 Thanks John, this is an interesting feature! Unfortunately I've only IRIS 2021.1 😓
go to post Pietro Di Leo · Aug 9, 2023 You're right, this is the correct version w $ZSTRIP($ZDATE($NOW(),4,,),"*","/"),!
go to post Pietro Di Leo · Aug 9, 2023 Thank you Menno for this interesting solution. If I can't resolve the issue using my method, I will try to adapt your solution to my case.
go to post Pietro Di Leo · Jul 27, 2023 Thanks for the feedback. I tried setting Connect Timeout and Response Timeout as adapter's properties and Reply Code Actions, Retry Interval, and Failure Timeout as Business Operations' properties, in this way: Set ..Adapter.ConnectTimeout = 15 Set ..Adapter.ResponseTimeout = 10 Set ..RetryInterval = 5 Set ..FailureTimeout = 60 Set ..ReplyCodeActions = "E=R" But nothing changes if I modify the parameters, as the BO uses only the values defined in the Production Settings (even if they are all blank).
go to post Pietro Di Leo · Jul 27, 2023 I tried, but only the message that received a reply is displayed. edit. I also tried with the BO parameter "RetryCount", for example: $$$TRACE(..RetryCount()) but this property is a boolean variable and so I always get print "1". In the same way, I also tried the methods RetryCountGet(), which always print me "1", and RetryCountLogicalToDisplay(), which always print me "96".
go to post Pietro Di Leo · Jul 27, 2023 Thank you! Is it possible to set these parameters by code? I need to include many similar Business Operations to contact different entities, and I would like to set default parameters so that I don't have to change them every time I add a new BO.
go to post Pietro Di Leo · Jul 27, 2023 Thank you! With these settings and with a delay of 12 seconds of the Postman Mock Service, the BO correctly resends the message. However, I can't see the resent messages in the visual trace but only a message, as it happens when the message is not resent. Is there a way to see the resent messages as well or at least to see a warning or a log telling us that the BO is trying to send the message again?