Starting a Process from a SAIL interface and chaining

Certified Associate Developer

Hello There,

I have a SAIL form with a button that starts a small process model via a!startProcess().  This model is set to chain from start to finish however the button is returning the "onSuccess" condition before the process instance completes. 

However, when I use the exact same parameters on a SAIL form with a!startProcessLink (ie: same values for the ProcessModel and Parameters arguments) the process instance chains as expected and does not return until the instance is complete.

I am depending on this background process to update data and then fetching the updated results on the SAIL form inside a with()

Is this discrepancy the expected behavior? 

 

A couple notes:

  • The documentation says that both calls should respect process chaining
  • We are running on 18.1 however there is no mention of a related bug in any of the subsequent release notes (18.2 or the hotfixes)

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I seem to be encountering a similar issue. Did you ever find out what it was?

  • 0
    Certified Associate Developer
    in reply to Mathieu Drouin

    We have encountered the same now, in 2024 and in Appian 24.1 . It seems that, if the process takes more than some timeout that we can't define, startProcess returns even though the activity chaining is properly configured and it has not finished.

    However, in our trials we have seen that apparently, when startProcess returns, it brings the process variable values that the process has in that moment, even not finished. Thanks to that, in our case a workaround to this behavior has been to obtain these values early in the process, so that the WebAPI that starts it has them even if the process has not completed (which is somewhat overoptimistic, but well, it is better than having no value at all).

    Since the documentation for startProcess does not match the behavior of the smart service, I think that either the documentation should be changed to reflect all this (and prevent incidents from happening to application users, and developers from spending time in investigating solutions), or the smart service should be changed to honor the documentation.

  • 0
    Certified Lead Developer
    in reply to javicamara

    Are you sure that you are not breaking the chain inadvertently somewhere?

  • 0
    Certified Associate Developer
    in reply to Mathieu Drouin

    It is difficult to tell, but the truth is that usually the expected value is returned - except sometimes, coinciding with the first time you made the call after a long time. I.e.:

    - Today around 9:30 I called the WebAPI, and it did not return the value

    - Immediately after that I made the call again with the same parameters, and it returned the value

    - Same after several other trials

    In call call the same parameters and functionally were used, and in the Process Activity everything looked just the same in all cases. To me it sounds like there is a "warm up" due to the first time you use the stuff, that causes a delay that can surpass some internal timeout.

  • 0
    Certified Associate Developer
    in reply to javicamara

    I find it amusing that 6 years after the fact we're still seeing this behavior. 

Reply Children
No Data