in a give flow lets say there is a failure like risk check and needs to go into manual review, what is the recommended way to handle this.
Take a look at forum posts here and here that describe possible implementations for human tasks/approvals. Let me know if you have further questions on this.
Example if there is an order entity, should we maintain the order in a different table and pass the reference to the workflow or even save the order on the temporal workflow.
With Temporal workflow execution itself can be considered such an entity which can be updated (with workflow code / external signals) during execution. The workflow execution itself should be your “source of truth” and not an external persistence store in most cases.
Temporal gives you workflow id uniqueness guarantee (you cannot have more than one running workflow execution with a particular id at the same time, in the same namespace).