1
0
-1

If I execute a couple of different options from a menu system based on the web framework, I get an error 

RIA Error Instance XXXXXX included multiple times with different input scope. 

What diagnostics can I play with to see if I can determine what operations I need to change to get rid of the error? 

I am running the web environment debuggable, but it doesn't appear to fire any server side proc when this is happening.  

What (if anything) can I look at in the browser debugger to get the stack of inclusions? The scenario which casuses this in the web page is a fairly likely one to be used in production, and once the error starts I get a cascade of them which only goes away when the entire site is reloaded. So I can't release this code until I have worked out how to prevent it. 

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      So I found the actual problem ( a scope declaration in an operation on DSP A referencing DSP B) which failed because DSP B had already been instanciated with a different scope. 

      Not sure I understand scope, and it's implications. Anyone got a pointer to a short course/manual on where and how to use it, or is it best to declare input/output on EVRYTHING? 

      Iain

      1. David Akerman

        The help topic Input and Output Scope describes scope, and we are actively working on a new DSP development web course for https://learn.uniface.com that will cover this topic. In the mean-time, I've sent you some of my notes which will hopefully give you a better understanding of use cases.

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Hi Iain, I assume your code is based on my personal DSP development framework, which is not an officially supported offering. Only older versions of this perform component activation in JavaScript (web\js\app.js), but this has been done server-side (either in the MAIN or NAV components) for quite a while now, so perhaps your code is based on an older version.

      I can arrange a meeting request to discuss & help you diagnose the issue if you send me an e-mail suggesting a suitable time (Tuesday after lunch is currently free for me) - either Microsoft Teams or Skype for Business would work for me.

      Best Regards,

      David Akerman
      Subject Matter Expert, Uniface (UK)

      1. Iain Sharp

        Hi David,

        Yes it's based on the one we were playing with last year.  I believe the component activation is indeed done in NAV or MAIN, it's when the error is coming up there is no server interaction. As it happens, the mentioned instance is not the one I believe has focus in the MAIN container(s), so I don't know why it chooses then to complain about it. I'd love to discuss and will pm you about times. 

        Iain

      2. Iain Sharp

        Hmm, we appear to no longer have a PM style messaging on the new forum. Tuesday later in the afternoon is good (15:30?)

      3. David Akerman

        To give you a head-start, the JavaScript calls NAV.menuClick() on the server, which calls NAVSVC.getResource() to translate the menu resourceID to a component name and instance name. If you don't have these methods you probably have an earlier version which instantiates from JavaScript (which is less secure). Instance names are not currently stored in the JSON configuration file, but it is easy to add some custom logic in NAVSVC to check the resource name and return a different instance name to the component name where needed (there should already be some examples). A simple enhancement would be to add an optional instance property to the JSON file, and use it if specified, otherwise assume it is the same as the component name.

      4. Iain Sharp

        As far as I am aware there's only one instance of the relevant DSP, generated from the menu code in NAVSVC, those options are indeed there. 

        I suspect the issue is because several operations on this DSP have been called with different scope entries, but I do not understand scope and its requirements/limitations enough to work them through. 

        I was hoping there was some way of unpacking the information held in the uniface data on the browser, to see what scope(s) were in effect, from which I could track the operations and ensure their scopes were in sync. 

        As I say, at the time the error is being displayed, NO proc is being fired at all, and the most recent DSP to be used in the HOME container is not the one complaining about scope. It fires on running the B_CLOSE code, so it may well be trying to go back to the screen about which it is complaining, but that is conjecture, as I can't track or debug what it is doing. 

        Regards, 

        Iain

      CommentAdd your comment...