Skip to main content
jasonb1005
May 1, 2023
Solved

Wizard that calls an interface for it's sections

  • May 1, 2023
  • 5 replies
  • 0 views

Hello,

I have a wizard interface set up where each section of the wizard calls an interface rather than having all of the code in the same object. The interface object I call has a number of text fields that run an email notification process. The text fields are all working properly and all the input values are saved in rule inputs. (When I type my name in, and then move to the next field, the value I typed persists and does not revert back to the placeholder value). However, when I call this interface in my wizard, the value does not persist and reverts back to the placeholder value. What am I missing? 

Thank you,

Jason Bongiovanni

Best answer by sanchitg0002

First of all, you need to save all the required values inside child interfaces in rule inputs and then where you are calling these interface objects in parent interface you need to save the values in parent interface variables either rule input or localVariable depending on what you want to do with that data, if you need to pass it to a process then store in a rule input o/w localVariable are sufficient. Keep in mind that data flows to and fro in these variables when there is a saveInto operation on the rule input in the called interface.

So, your expression should look like:

a!localVariables(
  local!data,
  local!data1,
  rule!childInterface(
    input: local!data,
    input1: local!data1,
    input2: ri!data
  )
)

5 replies

May 1, 2023

First of all, you need to save all the required values inside child interfaces in rule inputs and then where you are calling these interface objects in parent interface you need to save the values in parent interface variables either rule input or localVariable depending on what you want to do with that data, if you need to pass it to a process then store in a rule input o/w localVariable are sufficient. Keep in mind that data flows to and fro in these variables when there is a saveInto operation on the rule input in the called interface.

So, your expression should look like:

a!localVariables(
  local!data,
  local!data1,
  rule!childInterface(
    input: local!data,
    input1: local!data1,
    input2: ri!data
  )
)

jasonb1005
May 1, 2023

Is there a way to get the data from the child interface into the partent interface without creating a rule input in the parent interface? 

May 1, 2023

Nope, you need to create any one of the variables which are available in an interface rule viz. rule input and localVariable