Reprovision is an action unlike a destroy, so you want to listen for VMPSMasterWorkflow32.Active.EVENT.onReprovision. Then you can write a custom property out to the payload that doesn't trigger your destroy. Look at this thread as an example.
Sorry for the late edit, but there is still one issue I somehow cannot resolve.
So on one side I have the Active event subscriptions, on the other the lifecycle subscriptions.
What I want to achieve is, to run a workflow when the VM is disposed but not, when the disposing takes place as a result of reprovisioning. Following conditions have to be included in the event subscriptions as a result:
topic ID: com.vmware.csp.iaas.blueprint.service.machine.lifecycle.provision
All of the following
Data > Lifecycle state > Lifecycle state name Equals VMPSMasterWorkflow32.Disposing
Data > Lifecycle state > State phase Equals PRE
Data > Machine > Machine type Equals Virtual Machine
*a condition that says to NOT trigger the sub when reprovisioning takes place shoud go here*
How can I build an event subscription based on this condition?
AFAIK you cannot mix both needed topics: check for active events (com.vmware.csp.iaas.blueprint.service.machine.lifecycle.active)
and check provisioning state (com.vmware.csp.iaas.blueprint.service.machine.lifecycle.provision).
edit: while thinking about the above setup it came to my mind, that I would also need to separate the onProvision trigger from triggering workflows with the VMPSMasterWorkflow32.MachineProvisioned state. Since a new machine is provisioned in course of the reprovisioning action, the provisioning state is triggered too and as a result the day-2 operations run again. However, I do not want to run some of those in case of a reprovisioning action and to achieve this I would need to somehow tell the triggered workflow, that this provisioning state is triggered by a reprovisioning action.
I think the easiest way to reach my goal is to just create a separate subscription for the reprovisioning event and have it write a custom property to the vm, like myOrg.vmIsBeingReprovisioned = true and query this property during workflow runs when a vm is provisioned or disposed.