code: public  void  execute() throws ActivityException{
          isSynchronized = checkIfSynchronized();
          if (!isSynchronized) {
              EventWaitInstance received = registerWaitEvents(false, true);
              if (received!=null)
                  resume(getExternalEventInstanceDetails(received.getMessageDocumentId()), received.getCompletionCode());
          }
      }
docs: Executes the controlled activity
  @throws ActivityException