Post Tue Dec 20, 2016 1:52 pm

Refresh Pick & Execute data launched from process definition

I have a pick & execute that is delcared in a Process Definition (in parameter, a window reference that points to my window that is a pick & execute).

When I select a line (or several) and click on the process button (button list), the linked BaseReportActionHandler executes.
(I use a BaseReportActionHandler because I want to print the result of the execution)

The only problem is that the process updates data in the database, and when the process finishes, I can't find a way to refresh the data of my window (pick & execute).

This is the code I use to refresh the grid:
  Code:
    JSONObject actionRefresh = new JSONObject();
    JSONObject actionRefreshParams = new JSONObject();
    actionRefresh.put("refreshGrid", actionRefreshParams);
    responseActions.put(actionRefresh);
...
    jsonResponse.put("responseActions", responseActions);
    return jsonResponse;


I tried adding a button that only refreshes the grid, but that doesn't refresh the data either
  Code:
    JSONObject jsonResponse = new JSONObject();
   
    JSONArray responseActions = new JSONArray();

    JSONObject actionRefresh = new JSONObject();
    JSONObject actionRefreshParams = new JSONObject();
    actionRefresh.put("refreshGrid", actionRefreshParams);
    responseActions.put(actionRefresh);
   
    jsonResponse.put("retryExecution", true);
    jsonResponse.put("refreshParent", true);

    jsonResponse.put("responseActions", responseActions);

    return jsonResponse;


I tried it on a HQL table, a view and a physical table, but none of them work.

Is there a way to refresh the data in the pick & execute?

I can't use a standard window as the end user has to update some data before launching the process, so I need multi-line selection with possible data modification.

Basically, what I'm doing is displaying the orderlines that have a quantity remaining to deliver. When a line is selected, the end user can update the quantity (...) and launch the creation of the shipment(s). Once the shipments are created, they are printed (pdf).

Thanks a lot for your time
Best regards