public final boolean resumeWaiting(InternalEvent event) throws ActivityException {
        boolean done;
        EventWaitInstance received;
        try {
            received = getEngine().createEventWaitInstance(getActivityInstanceId(), getWaitEvent(), null, true, false);
            if (received == null)
                received = registerWaitEvents(true, true);
        }
        catch (Exception e) {
            throw new ActivityException(-1, e.getMessage(), e);
        }
        if (received != null) {
            done = resume(getExternalEventInstanceDetails(received.getMessageDocumentId()),
                    received.getCompletionCode());
        }
        else {
            done = false;
        }
        return done;
    }
public final boolean resumeWaiting ( InternalEvent event ) throws ActivityException { boolean done ; EventWaitInstance received ; try { received = getEngine ( ) . createEventWaitInstance ( getActivityInstanceId ( ) , getWaitEvent ( ) , null , true , false ) ; if ( received == null ) received = registerWaitEvents ( true , true ) ; } catch ( Exception e ) { throw new ActivityException ( - 1 , e . getMessage ( ) , e ) ; } if ( received != null ) { done = resume ( getExternalEventInstanceDetails ( received . getMessageDocumentId ( ) ) , received . getCompletionCode ( ) ) ; } else { done = false ; } return done ; }
This method is made final for the class, as it contains internal logic handling resumption
of waiting. It re-register the event waits including waiting for task to complete.
If any event has already arrived, it processes it immediately.

Customization should be done with the methods {@link #processOtherMessage(String, String)}
and {@link #registerWaitEvents()}.