Unable to fetch entire data using #getdatasubsetdownloadlinkfromprocess

Hi All,

As we have our environment on cloud I am using #getdatasubsetdownloadlinkfromprocess to fetch data from process model.

I am to extract data in excel sheet, however data in table is 7000 rows, but I can see only 1200 being extracted. I have used query entity with pagination(1 to -1).

So, my question is, how do I pull all data (7000 rows), in single sheet of excel sheet without making any changes in configuration file and in single instance.

OriginalPostID-256036

  Discussion posts and replies are publicly visible

  • @pradeepd A few questions for you as follows:
    1. How many columns are you trying to retrieve?
    2. What's the reason behind the failure in getting the data? Is the query entity unable to retrieve the data though you have given -1 as batchSize or is the process failing on the whole?

    From the configuration perspective, I don't think there is much to do and we have to align with the constraints laid by the plugin. And re 7000 rows, I opine that these kinds of data sets must be pulled in batches rather than pulling all at once and for this, you may want to go for looping in the process. Meanwhile, I would also suggest checking if the process completes in 60 seconds and if not, start looking at alternatives.
  • @sikhivahans: there are around 16 columns. Process is not failing as a whole. It is extracting data when I have less columns in another table.(approx 1000). I am getting error 500. It keeps on circling for 60 secs and then I get this error message. And requirement is in such was that we dont want in batches..we need entire data in single shot.
  • @pradeepd May I please know if you are aware of the fact that the 'Download Databsubset' implementation should finish in 60 seconds?

    Also, may I please know why the query isn't being expected to run in batches? Afaik querying the huge datasets in a single shot isn't a great way to do things at least when we are in the process. This is because of various reasons such as preventing query rule from failing because of huge datasets, preventing an operation from engaging continuously for large durations and performance issues.

    At a high level, I opine that 'Download Datasubset' isn't a right choice for your use case and especially this plugin isn't good when the data sets to export are large.
  • @sikhivahans: Sorry.. I meant, it is extracting data when I have less rows and not columns.(approx 1000 rows)
  • @pradeep Yes, the plugin works fine as long as its constraints are met, that is, completion of process within 60 seconds or minimal data set.
  • 0
    Certified Senior Developer
    in reply to sikhivahans
    I am getting the 500 internal error when using getdatasubsetdownloadlinkfromprocess. When I monitor the instance, I could see that the data is not populating in exportData pv.

    datasubset=[startIndex=1, batchSize=-1, sort=[field=NOMINATION_ID, ascending=False], totalCount=0, data=, identifiers=], filename=Nomination Report]

    Log

    2017-08-18 08:12:01,018 [ajp-/0.0.0.0:8009-3] ERROR com.appiancorp.ap2.PortalResponse - Error: 500
    2017-08-18 08:26:14,037 [ajp-/0.0.0.0:8009-3] ERROR com.appiancorp.ps.exceltools.servlet.ExportDataSubsetToExcelFromProcessServlet - Index: 0, Size: 0
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:653)
    at java.util.ArrayList.get(ArrayList.java:429)
    at com.appiancorp.plugins.typetransformer.AppianList.getObject(AppianList.java:67)
    at com.appiancorp.ps.exceltools.util.ExcelHelperUtils.fieldNameChecker(ExcelHelperUtils.java:208)
    at com.appiancorp.ps.exceltools.util.ExcelHelperUtils.convertDataToExcel(ExcelHelperUtils.java:152)
    at com.appiancorp.ps.exceltools.util.ExcelHelperUtils.convertDataToExcel(ExcelHelperUtils.java:105)
    at com.appiancorp.ps.exceltools.servlet.ExportDataSubsetToExcelFromProcessServlet.doGet(ExportDataSubsetToExcelFromProcessServlet.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

    Any suggestions would be helpful!
  • 0
    Certified Senior Developer
    in reply to Thenmozhi Mohanakrishnan
    Could you try and use "Export SQL to Excel Smart Service", then get the doc id of the generated excel and pass it to a!documentDownloadLink() ?
  • The Issue has resolved. The data was not populating in process model since the rule had loggedInUser(). I replaced the function with an ri and passed the pp!inititator while calling the rule from process.