Is it possible to not execute some process if its executed before

I have two parallel process for Order Workflow process.
Payment and shipment adapter.

If payment is success, and shipment fails, again if the workflow recieves for the same order Id, it should not go to payment adapter but based on history it should only process shipment adapter.

Can this be done ?

Thanks,
Mithun

I think you should have another service task before your payment adapter task, in wich you will call an external service asking if this payment was already processed, or query the history database looking for this information. Then you could use an exclusive gateway to pass without executing the Payment Adapter task.

Sure.
Thanks for your response.

Also if some processes fails in between, is it possible to resume from that process instead of starting the workflow process from beginning if the same Order I’d is passed using programmatically?

My recommendation is to look into the power of BPMN first. Have you considered what can be achieved in your scenario with embedded sub processes (scoping) + attached boundary events (types: error, escalation, cancellation, compensation)? An alternative could work with an event sub-process having an interrupting start event.

(There are a few remote trainings coming up, in case you are interested https://camunda.com/services/training/)

Yes. The short answer: check async before / after to control transactions and “save points”.
The comprehensive answer Transactions in Processes