code: protected final void wait(final WaitMode mode, final long timeout, final TimeUnit timeUnit, final String... correlationIds) throws Interrupt {
          if (correlationIds.length == 0)
              throw new IllegalArgumentException();
          updateLastWaitStackTrace();
          for (int i = 0; i < correlationIds.length; i++) {
              if (correlationIds[i] == null)
                  throw new NullPointerException();
          }
          engine.registerCallbacks(this, mode, timeout > 0 ? timeUnit.toMillis(timeout) : 0, correlationIds);
      }
docs: Generic wait/sleep. In case of WaitMode FIRST, it waits until at least one response for the specified correlation
  ids occurs.
  In case of WaitMode ALL, it waits until a response for every specified correlation id occurs.
  
  @param mode
  WaitMode
  @param timeout
  timeout or {@link Workflow#NO_TIMEOUT} (or any value &le; 0) to wait for ever
  @param timeUnit
  unit of the timeout; ignored, if a negative timeout is specified
  @param correlationIds
  one ore more correlation ids
  @throws Interrupt
  for internal use of COPPER. When wait is called, an Interrupt is thrown, caught by COPPER itself for
  taking back control over the executed workflow.