Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello community!
I am looking through the PTC | Windchill code right now and I am encountering a lot of if(RemoteMethodServer.ServerFlag) { run code } else { remoteMethodServer.invoke(...)} constructs.
I am figuring this means something like "If the code is executed server-side then continue, otherwise invoke the method on the particular method server". But where would this code be executed, if not on the method server?
Can anyone please give me a better / more technical explanation. Why is it important to use this construct and when should you use it?
Thanks in advance and best regards
Solved! Go to Solution.
Hi @TG_10272716
The code can be run from Windchill shell, that moment you should care what MS you want to use or you can get the default one.
If method server is not available then code fails
PetrH
Hi @TG_10272716
The code can be run from Windchill shell, that moment you should care what MS you want to use or you can get the default one.
If method server is not available then code fails
PetrH
Hi @HelesicPetr, thank you for your reply. So, this basically means that I have to implement some kind of check (like mentioned above) whenever the code can or might be executed in the Windchill Shell.
Are there any other cases where this is required, what about Queues? Isn't there a difference between executed by Windchill (scheduled queue) and executed by the user (click)?
Best regards
Hi @TG_10272716
I would say yes .
queue is run on the method/background server directly so you do not need to cares about the check
PetrH