code: public MessageInfo getMessageIn(MessageProcessInfo recMessageProcessInfo)
      {
          return (MessageInfo)((ReferenceField)recMessageProcessInfo.getField(MessageProcessInfo.MESSAGE_INFO_ID)).getReference();
      }
docs: GetMessageIn Method.