Hi All,
We are looking at using InterApp to talk to an API and was wondering about a couple of points:
- Does InterApp support sending multiple requests from different panels/buttons at the same time to avoid having to lock the element whilst the request is being sent/processed?
- If sending 2 requests to make changes using the same panel/button (i.e. setting one input to paused and one to active) which is done through 2 separate API requests can that be sent at the same time or do you need to wait for a response before actioning the next request
- Is there any documentation that details the base mechanism on InterApp?
Thanks
Ryan
Hi Ryan,
Regarding your questions
- You can send a single message or, what we call, an InterAppCall, which is like an array of messages that get sent at once.
You can check the Factory classes next to each type to create them accordingly. - If you use the single message option you most likely need to wait for the response but if you go for the InterAppCall approach you can send both at once and it will then be up to your executor to determine how they should be processed.
- You can find documentation on how to get started with InterApp at InterApp classes | DataMiner Docs
I do believe the requests should be queued as they should behave as set parameters triggering a QAction and it should wait for one QAction execution to finish before starting the next execution for the second request.
Note: InterApp messages are ‘queued’ per element. (they use the SetParameter Thread in the background)
So if you send a call to element 1 and element 2 at the same time, then there is no queue and there is no guarantee on when either call is processed.
If you send 2 calls both to element 1, then the calls are processed in order.
Hi Joao,
Maybe I didn’t explain what I meant for point 1, so if we have 2 channels, with 2 different panels controlling them and want to set the inputs on the 2 individual panels, will InterApp queue the requests or do we need to lock the element until it has processed the first one and then we can do the next one.
So hit set on CH01, then hit set on CH02 and interapp queues the requests or hit ch01, lock the element so it can do the set, unlock and then do the same for ch02?