@Override
  protected void doReceive(Message message) throws Exception {
    long userId = message.getLong("userId");

    Map<String, Boolean> results = TestPACLUtil.testCurrentThread(userId);

    message.setPayload(results);

    MessageBusUtil.sendMessage(message.getResponseDestinationName(), message);
  }
  protected KaleoTimerInstanceToken getKaleoTimerInstanceToken(Message message)
      throws PortalException, SystemException {

    long kaleoTimerInstanceTokenId = message.getLong("kaleoTimerInstanceTokenId");

    KaleoTimerInstanceToken kaleoTimerInstanceToken =
        KaleoTimerInstanceTokenLocalServiceUtil.getKaleoTimerInstanceToken(
            kaleoTimerInstanceTokenId);

    return kaleoTimerInstanceToken;
  }
  protected void doReceive(Message message) throws Exception {
    long kaleoTimerInstanceTokenId = message.getLong("kaleoTimerInstanceTokenId");

    try {
      KaleoTimerInstanceToken kaleoTimerInstanceToken = getKaleoTimerInstanceToken(message);

      Map<String, Serializable> workflowContext =
          WorkflowContextUtil.convert(kaleoTimerInstanceToken.getWorkflowContext());

      ServiceContext serviceContext =
          (ServiceContext) workflowContext.get(WorkflowConstants.CONTEXT_SERVICE_CONTEXT);

      _workflowEngine.executeTimerWorkflowInstance(
          kaleoTimerInstanceTokenId, serviceContext, workflowContext);
    } catch (Exception e) {
      if (_log.isWarnEnabled()) {
        _log.warn("Unable to execute scheduled job. Unregistering job " + message, e);
      }

      String groupName = SchedulerUtil.getGroupName(kaleoTimerInstanceTokenId);

      SchedulerEngineHelperUtil.delete(groupName, StorageType.PERSISTED);
    }
  }