My Child Interface has Submit and Cancel Button. It has File Upload functionality. Below are the 2 Rule Inputs it has:
I have a Parent Interface which uses Navigation, in one of the Navigation link I need to have this Child Interface appear. I was using rule!Child Interface, but its asking me to pass 2 parameters. Can you please help me on how I can pass those 2 parameters from Parent Interface?
Regards,
Mahesh
Discussion posts and replies are publicly visible
Hi maheshg821223 ,Whenever we call an interface within another interface, we need to pass the necessary parameters to handle actions or transfer values between interfaces. We can use either local variables or rule inputs, depending on the specific requirements. Rule inputs function as global variables and can be managed through the process model. Alternatively, if you need to use the values within the interface itself, you can pass local variables.
For example:rule!Interface(cancel: ri!cancel/local!cancel,fileUpload: ri!fileUpload/local!fileupload)
Regarding interface layouts, we cannot use form layouts when calling an interface within another, as form layouts are top-level layouts and cannot be nested. Instead, we should use section layouts for such scenarios.
Thank you gayatria0439 , My parent interface is just a stand-alone Interface. Parent Interface has Navigation on the left side. Each Navigation link should open a new interface on the right hand side. I have attached screenshot for your reference. For example, upon click of Bulk Upload Navigation link it has to open Child Interface. In this case, Child Interface has File Upload utility and with Cancel/Submit button. Child Interface has 2 Rule Inputs which are Cancel (Boolean) and excelData (DocumentType). Child Interface has a process model to process the data from the File Upload.
I am now able to call the Child Interface successfully from parent interface by passing parent interface localVariables to them. But when I click Submit button on the Child Interface, nothing happens, I mean the file upload does not trigger.
It works fine when I test the Child Interfaced Process Model.
I am new to Appian, can you please advise if I am doing something wrong here?
maheshg821223 hope you configured the child interface either as a start form or user input task in the process model and that is why it was working when you test it from the child interface. Instead try removing the form from the process model and call the process model using a!startProcess() in the saveInto parameter of the submit button to start the process model
Hi Magesh Waran G
I have modified my Process model and removed the call to Child Interface. Also I have modified the Child Interface Submit button to use a!startProcess(), code provided below for reference.
Then I call the Parent Interface from the Site and click on Bulk Upload, select an excel to upload, and then click on Submit , In both the cases (Process Model calling the Child Interface or Child Interface calling the Process Model), Process Model seems to trigger end to end, but the data is not getting written to the database.
When I test the Child Interface or Process Model separately, they both load the data into database successfully.
{ a!sectionLayout( label: "", contents: { a!fileUploadField( label: "", labelPosition: "ABOVE", target: cons!VWHIAP_BULK_LOAD_FOLDER, fileNames: "DD Review File " & now(), value: ri!excelData, saveInto: {ri!excelData}, validations: {} ), a!buttonArrayLayout( buttons: { a!buttonWidget( label: "Cancel", value: true, saveInto: ri!Cancel, submit: true(), style: "OUTLINE" ), a!buttonWidget( label: "Submit", value: false, /*saveInto: ri!Cancel,*/ saveInto: a!startProcess ( processModel: cons!VWHIAP_Bulk_Upload_Process_Model, processParameters: { cancel: false(), excelData: ri!excelData }, onSuccess: null(), onError: null() ), submit: true(), style: "OUTLINE" ) }, align: "START", marginBelow: "NONE" ) } ) }
maheshg821223 can you try checking the value of output parameters of Import Excel to Database node by saving into PVs to check whether any error occurred during the import?
Please see below 2 screenshots. excelData is the parameter I am passing.
I got my issue resolved. Local variables are not passing the values correctly to Child Interface. I instead set up my process model on the Site and called the Child Interface from the Site page. This resolved the issue.