How to start a process synchronously by a webapi

Good afternoon,
We are in a project where we start a process from a webapi with the function a!starprocess but the process starts asynchronously and we need to start the process synchronously to  return the answer when the project had finished  If anyone knows, I’d appreciate it.

Best regards,

Rebeca

 

  Discussion posts and replies are publicly visible

Parents
  • What information are you returning from the process? Is the process (1) doing something quick like getting data from a database that is returned (2) waiting for a task to be completed, or (3) doing something more complex?

    If (1) is the case, you should see if the query can be run directly in your web API to return the data. Then use the result of the query as the response to the API.

    If (2) is the case, this is not a good design paradigm. It's unknown how long it will take for the task to complete, so you should set this up to have an Appian Integration make a request back to the external system once you have finished the task.

    If (3) is the case, you may be able to use activity chaining. This can ensure that certain steps are complete in the process before returning the response in your Web API: https://docs.appian.com/suite/help/19.2/Process_Model_Recipes.html#using-activity-chaining-to-display-multiple-forms-in-succession Be careful with this method though because it can run into issues if you have long chains or activities that take too long in an activity chain. (1) or (2) will be more effective

Reply
  • What information are you returning from the process? Is the process (1) doing something quick like getting data from a database that is returned (2) waiting for a task to be completed, or (3) doing something more complex?

    If (1) is the case, you should see if the query can be run directly in your web API to return the data. Then use the result of the query as the response to the API.

    If (2) is the case, this is not a good design paradigm. It's unknown how long it will take for the task to complete, so you should set this up to have an Appian Integration make a request back to the external system once you have finished the task.

    If (3) is the case, you may be able to use activity chaining. This can ensure that certain steps are complete in the process before returning the response in your Web API: https://docs.appian.com/suite/help/19.2/Process_Model_Recipes.html#using-activity-chaining-to-display-multiple-forms-in-succession Be careful with this method though because it can run into issues if you have long chains or activities that take too long in an activity chain. (1) or (2) will be more effective

Children