Desktop and UI Extensibility

Get Involved. Join the Conversation.

Topic

    Graham
    Equivalent of RuleActionInvoked in a browser UI add-in
    Topic posted May 31, 2019 by GrahamGreen Ribbon: 100+ Points 
    105 Views, 6 Comments
    Title:
    Equivalent of RuleActionInvoked in a browser UI add-in
    Summary:
    How do I handle rule actions in browser UI add-ins
    Content:

    I'm trying to figure out how to get at rule actions with-in a browser UI add-in.

    We have a desktop add-in that does this, but those don't work on the browser UI, so I need to develop an equivalent add-in.  Can somebody point me in the right direction please or can this not be done?

    Version:
    18D

    Comment

     

    • Vlad

      I am not sure if there is a more straightforward way to do this, but this may work: You add a rule action to fire a specific, unique named event and in the BUI add-in you listen for that event and if it fires, the rule was hit.

    • Graham

      Nice idea Vlad - that should work, but how do I then pass parameters?

      The desktop add-in took rule actions like the following:

          someAction someParameter

      And on a related topic, how would I deal with the equivalent of RuleConditionInvoked?

      Also, the workspace editor lets me select the control in a rule, which suggests this should be possible.

    • Jens Lundell

      Hi Graham, I believe this is the relevant section from the documentation: http://documentation.custhelp.com/euf/assets/devdocs/unversioned/BUI_Extensibility/topicrefs/Invoking_global_actions.html

      Hope this helps.

      Jens Lundell
      Oracle Service Cloud

    • Graham

      Thanks Jens.  That looks like its going in the right direction, but it isn't that obvious how to use it.

      I am getting this error message now:

      Workspace rule execution has exceeded 30 seconds and has been terminated. If this issue persists please contact your administrator.

      Here's what I tried:

      var myAppId = 'My Application';
      var extensibilityApiVersion = '1.0';
      
      ORACLE_SERVICE_CLOUD.extension_loader.load(myAppId, extensibilityApiVersion).then(
          function(extensionProvider)
          {
              extensionProvider.getGlobalContext().then(
                  function(globalContext)
                  {
                      globalContext.registerAction('ui1',
                          function(param)
                          {
                              console.log(param);
                          }
                      );
              });
          }
      );
      

      *EDIT*

      It seems that you have to log out of the AgentWeb site and back in again to pick up any changes to the browser add-in.  So it does work - Thank you Jens.

      Which just leaves the rule "condition" piece.  How would I access that in a browser add-in?

       

    • Graham

      Thanks Naveen.  It does indeed use the same code, but the return value seems to be ignored.

      Whilst writing this comment, I tried again and it now works, so there seems to be more than the need to logout of the AgentWeb page and back in again - there seems to be some caching issue getting in the way, which is a bit of a pain when trying to test changes.  That might be our proxy/network setup doing that, so can't say whether this is a RightNow issue or not, but it certainly hasn't helped in getting to the bottom of this.

      So thanks all - no more questions.