Rule Input setting to null after refresh after interface gets refreshed

Certified Senior Developer

There is an interface created which displays business elements in a tabular form, fetching details from a process report. The interface is expecting a rule input and filter the data based on rule input.

The issue I am facing is, once the interface page gets refresh, the rule input value is getting set to null. Any idea how to handle this scenario?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hi  ,

    'interface page gets refresh", are you reloading the interface or how it is getting refreshed?

    and from where the rule input value is getting?

  • 0
    Certified Senior Developer
    in reply to Kiran

    Hi Kiran- 

    There is a separate UI, from there, customer name is passed as parameter to this interface. This interface shows all the business elements which are used during execution of the process model. Also it shows the user input task name with task link through which user can take action on user input task. User input task name changes as soon as workflow moves further. 

    The issue is, once the interface (based on process analytics) loads the data based on that customer which is being passed as a parameter to this interface from another interface and user task link is clicked, it opens up a user input form where user can take action, also the interface page should be refreshed as soon as the user input task is actioned to show the next user input task. currently I did not implement refresh feature. I manually refreshed the page but the customer name which is passed as rule input is getting set to null and the interface is showing no data due to this. 

  • 0
    Certified Lead Developer
    in reply to amikb0002

    When data in a rule input is set to null, there is nothing you can do about it. Maybe you could create a copy of that rule input, but that might break the UX on the parent UI.

  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    Here is the snippet.

    data: a!queryProcessAnalytics(
    report: cons!WLRD_PROCESS_REPORT_POINTER,
    contextProcessModels: cons!WLRD_PROCESS_MODEL_POINTER,
    query: a!query(
    filter: a!queryFilter(
    field: "c17",
    operator: "=",
    value: ri!clientName,

    When page gets refreshed ( for now I am manually refreshing the page) , rule input becomes null and it throws below error.

    Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!gridField [line 43]: The a!queryFilter function has an invalid value for the "value" parameter. When the value of "operator" is "=" "value" must not be null or empty

    I would like to keep the rule input value intact when it is passed at the first time so after page gets refreshed, I will use it for filter. Any suggestion? TIA

    Note- I will handle null later in my code. 

  • 0
    Certified Lead Developer
    in reply to amikb0002

    The value of the rule input is controlled only by the parent interface passing the value.

    If you, for whatever reason, need/want to store a copy, assign it to a local variable using a!refreshVariables() to set refreshOnReferencedVariables to false.

  • 0
    Certified Lead Developer
    in reply to amikb0002

    Rule inputs are used to exchange values between objects like Interface and Expression, interface and Process Model, etc. But they don't have a memory of their own. You will have to use local variables for this. 

      You can take a look at this documentation for better clarity - docs.appian.com/.../Local_Variables.html

Reply Children
No Data