Hi Narendra
Assuming your PO workflow is based on BO BUS2012:
In Your PO WF definition, go to the header->tab Version Dependant ->Tab Events and provide the following:
1) Container Element = your main PO BO Variable (of type BUS2012)
2) Object cat -> BO
3) Object Type -> BUS2012
4) SIGNIFICANTALYCHANGED
5) Receiver Type -> Cancel Workflow
Whenever the PO is changed -> BUS2012.SIGNIFICANTALYCHANGED will be triggered, thereby canceling a running instance.
NOTE: Please check if this gets triggered even when you release from workflow (if you are releasing explicitly from within WF). If that is the case, then instead of the above approach, use the Fork - 1 of 2. In one branch keep all the processing and in other use WAIT step to wait for event BUS2012.SIGNIFICANTALYCHANGED. After the wait, check for who the event initiator is, if it is WF-BATCH, do not do anything, else, use a process control step to complete/cancel the current instance.
Regards,
Modak