a!startProcess on button click executes the save in OnSuccess parameter before process finishes

I am executing a process model from an interface on button click using a!startProcess, and saving some of the process variables (lists) on the OnSuccess parameter of a!startProcess into UI variables. The process model has chaining enabled on all connections, both in the parent process and two sub-processes.  Both sub processes run synchronously, and execute at the same time.  In both sub processes, I loop over an integration using a counter variable (not MNI).

The issue that I am seeing is that the saves on the OnSuccess parameter of a!startProcess execute before the process is complete, so I either get no results from the process at all, or partial lists.  When I monitor the process, it executes successfully and all the expected values are there.

How can I ensure that the entire process executes before the OnSuccess saves execute?   The process typically takes between 1-3 minutes to finish.

 

Note: The goal of this process is to loop over an integration that can only download 1 document at a time.  If there is a better way to perform this looping, I am open to suggestions.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    Hi  ,  , I am getting this error : Not a valid Web API Response. Received: [Lcom.appiancorp.core.data.Record;@428f85c0  in my community edition site when I Created a Post WebAPI with a process model to consume the data using write records. My observation was the json was getting succesfuly consumed by the process model and was writting in records with no errors but my WEBAPI object was giving me 500 error. 

    any idea where it is breaking , also when i set content-type to application/json my response after pushing json is showing content-type text/plain; charset=ISO88599-1.

    your inputs will be helpful.

    thanks in advance.

Children