I have following scenarios on which I need your advice or if you could point me to appropriate examples, that will be great. I am evaluating how some order flows could work using flowable engine.
- The bpm workflow process in one of the tasks calls an external system. The external system responds with acknowledgement synchronously. Few seconds (max few minutes) later, external system sends success or error response on the callback URL (http transport) provided in request. How do I trigger the waiting receive task on receiving the callback request? The callback url should have the process instance id & step id? Should I be using flowable event registry? It should also be possible to inject the response parameters from the callback payload into execution context. Or is there any other recommended approach.
- The second scenario is similiar to first except that it runs over a period of few days as it is related to delivery of goods. The logistics system communicates on http transport layer with predefined payload. Also, the system sends intermediate statuses like being packaged, shipped, on the way, delivered, customer not at home - try 1, retrying delivery, failed to deliver, etc. During each inbound intermediate shipment message, we have to send messages to customer notifying the status. Once the end state is reached (delivery complete / delivery failed) appropriate action needs to be taken (go to next step / trigger fallout). Using again event registry triggering a separate process flow wherein the customer notifications are sent out? On end state, having separate listeners to trigger the main flow based on delivery status? The callback url should have the process instance id & step id?
Look forward to hear one’s views. Thank you.