Waiting for process to finish

I am new to Flowable so if there are links I should read instead please point me in the right direction and I will read that first to try and learn, however, in the meantime I have not found an answer to my problem which is that I would like to execute a relatively simple process (BPMN) where a number of HTTP requests are made out to external services and then the workflow process terminates with either success or failure status. There are no human tasks, all are automated and while there might be failures/retries/etc it will still all finish relatively quickly with either a success or failure.

As the initiator of the process, how do I programmatically wait around until it has finished?
Also, what is the pattern to extract this end status? Is it to have a variable or different termination nodes?

Best place to go is always the docs (Open Source), in this case specifically the BPMN one (Open Source). Secondly, the unit tests in the github repository form an excellent source of inspiration: flowable-engine/modules/flowable-engine/src/test/java/org/flowable at main · flowable/flowable-engine · GitHub. For http specifically, have a look at the flowable-http module tests: flowable-engine/modules/flowable-http/src/test/java/org/flowable/http/bpmn at main · flowable/flowable-engine · GitHub

If you don’t mark any of the process steps as asynchronous, the start method will return until everything is executed.

Yes, the easiest would be to store the result in a variable, which can be retrieved after the process has ran.