My requirement is:
Whenever the total amount of a Sales Order exceeds certain limit, then it should keep the SO on hold, then it will raise a business event to send information to a different system(SOA in our case). SOA will derive the approver's name and will release the hold. Then workflow will progress to next step.
Pls put forward your valuable suggestions for the same.
First, add a function to carry out the checking, find out the approver, and apply hold if needed.
And assume this function returns Yes (apply hold) or No (no need to hold).
"No" should connect to the original Book node so that the status will be changed to Book directly.
For "Yes", it should first link to a Notification, which tells the approver that a SO is required for his approval. The result should be either Approve or Reject. When Approve, connect to another new function that is release the hold.
This Requirement can be catered using forms personalizations ,
Create a condition in personalization if total_amount > limit then call a builtin which will call a pl/Sql procedure,
inside this procedure you can call api oe_holds_pub which will put the order on hold, and you can raise a custom business event to inform SOA taht business event has been raised.
Forms personalization could be an option, but beware, that these extensions would only be applicable for users of the Sales Order form. I run into many cases where Forms Personalization would be the simpler method of extension. However, if there is an unspoken requirement that the same extension also functions for on-line users, EDI, Order Import, Process Order API, etc, then the use of Workflow might be more appropriate.