Transferring data from a process model back to a calling interface

Hi all,

I have an interface with a button that calls a process model like this:

a!buttonWidget(
label: "Import from CSV",
icon: "commenting-o",
style: "NORMAL",
saveInto: {
a!startProcess(
processModel: cons!MY_PROCESS_MODEL,
processParameters: {},
onSuccess: {},
onError: {}
)
}
)

The purpose of this button and associated process model, is to load a csv file from the user. This data in this CSV file is then to be used to populate the fields in the calling interface.

My question:

how do I retrieve the process variable's in the process model identified by cons!MY_PROCESS_MODEL so that I can then set the values of other variables in my calling form?  I presume the code to do so would go into the "onSuccess" parameter, but I don't know how to reference them inside the process model...

any help much appreciated.

thanks,

David :-)

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hi David,

    a!startProcess will start the process in async and you will not have any access to CSV data. I can think of 2 options here.

    1. Show the first interface to upload and submit teh CSV, Once submitted call the smart service in your process model, do your operation on the csv store it in pv and show the user the next interface will all other details . The user will feel like the same page, only the complete page will refresh.

    2. As you were doing call the a!start process store value in table and refresh the grid with the data . You have to take care of data cleaning from the db and also if the size of csv is huge then , refreshing the grid  may not work  as expected.

    Thanks 

    Manish

Reply
  • 0
    Certified Senior Developer

    Hi David,

    a!startProcess will start the process in async and you will not have any access to CSV data. I can think of 2 options here.

    1. Show the first interface to upload and submit teh CSV, Once submitted call the smart service in your process model, do your operation on the csv store it in pv and show the user the next interface will all other details . The user will feel like the same page, only the complete page will refresh.

    2. As you were doing call the a!start process store value in table and refresh the grid with the data . You have to take care of data cleaning from the db and also if the size of csv is huge then , refreshing the grid  may not work  as expected.

    Thanks 

    Manish

Children
No Data