How to use Adhoc Event

          Adhoc event can be used in order to execute an adhoc action like excuting an activity in an existing instance on the fly. For Example, Cancelling an instance when a client decided not to proceed with the current order or creating an adhoc task in an in-flight instance when needed.

Now how do we do this? This can be done in two ways:
1. Using process Portal
2. using web API